Skip to content

Commit

Permalink
Docker-build tags for version for current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sparul93 committed Feb 7, 2024
1 parent 4a3668e commit d993bc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,21 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ghcr.io/cityofkamloops/filepass
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
# output 0.1.2
type=semver,pattern={{version}}
# output 0.1
type=semver,pattern={{major}}.{{minor}}
# disabled if major zero
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -34,4 +43,4 @@ jobs:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
- uses: psf/black@stable

0 comments on commit d993bc7

Please sign in to comment.