Skip to content

Commit

Permalink
Update build action to use tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Serubin committed Mar 21, 2024
1 parent aab2f34 commit 57b8562
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Build and Publish Docker Image
on:
push:
branches: ['master']
branches: ["master"]
tags: ["*"]

env:
REGISTRY: ghcr.io
Expand All @@ -19,7 +20,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
submodules: "true"
- name: Log in to the Container registry
uses: docker/login-action@v3.0.0
with:
Expand All @@ -33,7 +34,8 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
type=semver,pattern={{version}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
- name: Build and push Docker image
Expand Down

0 comments on commit 57b8562

Please sign in to comment.