Skip to content

Commit

Permalink
ci: add version to docker tags
Browse files Browse the repository at this point in the history
  • Loading branch information
thalesmg committed Oct 23, 2024
1 parent 7c64964 commit f3e80a4
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,22 @@ jobs:

runs-on: ${{ matrix.os }}

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Docker Metadata action
uses: docker/[email protected]
id: meta
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v2
- uses: docker/login-action@v2
Expand All @@ -24,8 +38,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}

- uses: docker/build-push-action@v3
- name: Build and push Docker images
uses: docker/[email protected]
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.repository }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit f3e80a4

Please sign in to comment.