add meta and tags / platform
Some checks failed
Some checks failed
This commit is contained in:
parent
6cb0d053df
commit
21e8497b57
@ -12,6 +12,14 @@ on:
|
|||||||
image_name:
|
image_name:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
file:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'Dockerfile'
|
||||||
|
platforms:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'linux/amd64'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
@ -40,15 +48,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v6
|
||||||
with:
|
with:
|
||||||
# image_name should be formatted like: user/repo
|
# image_name should be formatted like: user/repo
|
||||||
images: ghcr.io/${{ inputs.image_name }}
|
images: ghcr.io/${{ inputs.image_name }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
file: ${{ inputs.file }}
|
||||||
|
platforms: ${{ inputs.platforms }}
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
@ -12,6 +12,14 @@ on:
|
|||||||
image_name:
|
image_name:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
file:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'Dockerfile'
|
||||||
|
platforms:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'linux/amd64'
|
||||||
secrets: []
|
secrets: []
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -28,8 +36,18 @@ jobs:
|
|||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
token: ${{ github.token }}
|
token: ${{ github.token }}
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
run: docker buildx build . -t 192.168.1.150:9120/${{ inputs.image_name }}:latest
|
id: meta
|
||||||
|
uses: docker/metadata-action@v6
|
||||||
|
with:
|
||||||
|
images: 192.168.1.150:9120/${{ inputs.image_name }}
|
||||||
|
|
||||||
- name: Push Docker Image
|
- name: Build and push Docker image
|
||||||
run: docker image push --all-tags 192.168.1.150:9120/${{ inputs.image_name }}
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ${{ inputs.file }}
|
||||||
|
platforms: ${{ inputs.platforms }}
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user