Skip to content

Commit

Permalink
Merge pull request #1645 from eqlabs/mirko/ci-tag-latest
Browse files Browse the repository at this point in the history
ci(docker): don't tag prereleases as latest
  • Loading branch information
Mirko-von-Leipzig authored Dec 13, 2023
2 parents ede3a83 + ae5704c commit 81cb7fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ jobs:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Pull image
run: docker pull eqlabs/pathfinder:snapshot-${{ github.sha }}
- name: Tag image
run: |
docker tag eqlabs/pathfinder:snapshot-${{ github.sha }} eqlabs/pathfinder:latest
docker tag eqlabs/pathfinder:snapshot-${{ github.sha }} eqlabs/pathfinder:${{ github.event.release.tag_name }}
- name: Tag image with release name
run: docker tag eqlabs/pathfinder:snapshot-${{ github.sha }} eqlabs/pathfinder:${{ github.event.release.tag_name }}
# Only tag the image as 'latest' if its a release i.e. not a prerelease.
- name: Tag image with 'latest'
if: ${{ !github.event.release.prerelease }}
run: docker tag eqlabs/pathfinder:snapshot-${{ github.sha }} eqlabs/pathfinder:latest
- name: Push image tags
run: docker push --all-tags eqlabs/pathfinder

0 comments on commit 81cb7fc

Please sign in to comment.