This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Check newly released Docker image with current semantic version tag is also tagged with latest | |
on: # yamllint disable-line rule:truthy | |
push | |
jobs: | |
check_latest_tag: | |
runs-on: ubuntu-22.04 | |
env: | |
repo: agilepathway/pull-request-label-checker | |
image_ver: v1.6.13 | |
steps: | |
- name: Check Docker image for new release is tagged latest | |
id: check_docker_image_tagged_latest | |
# yamllint disable rule:line-length | |
run: | | |
docker pull ${{env.repo}}:${{ env.image_ver }} | |
echo "IS_LATEST_TAGGED_CORRECTLY=$(docker image inspect ${{env.repo}}:${{ env.image_ver }} | jq -r '.[] | (.RepoTags) | any( . == "${{env.repo}}:latest") ')" >> "$GITHUB_OUTPUT" | |
# yamllint enable rule:line-length | |
- name: Fail if latest is not tagged correctly | |
if: ${{ steps.check_docker_image_tagged_latest.outputs.IS_LATEST_TAGGED_CORRECTLY == 'false' }} | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.setFailed('The newly released Docker image ${{ env.image_ver }} is not tagged latest. ') |