Skip to content

Commit

Permalink
use metadata-action for docker tags
Browse files Browse the repository at this point in the history
  • Loading branch information
fedordikarev committed Sep 30, 2024
1 parent e669192 commit 51101ca
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Docker Meta
id: meta
uses: docker/metadata-action@v6
with:
images:
${{ vars.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
# branch event
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
# pull request event
type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -34,4 +45,6 @@ jobs:
uses: docker/build-push-action@v6
with:
platforms: linux/amd64, linux/arm64
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 51101ca

Please sign in to comment.