Skip to content

Commit

Permalink
Merge pull request #399 from input-output-hk/ch1bo/docker-tag-only-re…
Browse files Browse the repository at this point in the history
…leased-as-latest

Only tag released versions as 'latest' docker image
  • Loading branch information
ch1bo committed Jun 20, 2022
2 parents 3c2cca4 + 2f3876a commit 482d3d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Docker

# NOTE: This workflow builds & tags docker images always as 'latest', so ensure
# it only runs on events we want to have as 'latest' image on the registry.
# NOTE: This workflow builds & tags docker images also on master to get
# pre-release feedback about working docker builds, but it ONLY pushes them when
# we pushed a git tag. Hence, the 'latest' docker tag on the registry is equal
# to the latest released version (not the latest built from master).
on:
push:
branches: [ "master" ]
Expand Down Expand Up @@ -38,11 +40,11 @@ jobs:
latest
type=semver,pattern={{version}}
- name: 🔨 Build and push
- name: 🔨 Build and maybe push
uses: docker/build-push-action@v2
with:
context: .
push: true
push: ${{ github.ref_type == 'tag' }}
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit 482d3d0

Please sign in to comment.