Skip to content

Commit

Permalink
ci: Generate image tags in docker publish
Browse files Browse the repository at this point in the history
Merge pull request #329 from DFE-Digital/ci/update-docker-publish
  • Loading branch information
killij authored Nov 21, 2023
2 parents bd6750d + f777af2 commit cf869d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ jobs:
# Need to lower case the image name for the docker tags when publishing
- name: Downcase IMAGE_NAME variable
run: echo "IMAGE_NAME_LOWER=${IMAGE_NAME,,}" >> $GITHUB_ENV

# Sort out the image tags
- name: Set initial tag
run: echo "\=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:${{ env.RELEASE_TAG }}" >> $GITHUB_ENV

- name: Add latest tag if we're not production release
if: contains(env.RELEASE_TAG, "dev")
run: echo "IMAGE_TAGS=${IMAGE_TAGS},${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest" >> $GITHUB_ENV

#debug
- name: Log the tags
run: echo "Calculated tags value => ${{ env.IMAGE_TAGS }}"


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
Expand Down

0 comments on commit cf869d5

Please sign in to comment.