Skip to content

Commit

Permalink
Update code-checks.yml
Browse files Browse the repository at this point in the history
Changes to the tag parsing to support prs
  • Loading branch information
joshua-seals authored Sep 1, 2023
1 parent 190b4b1 commit 70a08e3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# - flake8-linter
# - image-build-test
#
# This workflow only validates images can build
# but does not push images to any repository.
# This workflow will build a test image for everything but develop
# and main branches.
#
# The build-push-dev-image and build-push-release workflows
# handle the develop and release image storage respectively.
Expand Down Expand Up @@ -96,7 +96,12 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true


- name: Parse Github Reference Name
id: branch
run: |
REF=${{ github.ref_name }}
echo "GHR=${REF%/*}" >> $GITHUB_OUTPUT
# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
Expand All @@ -106,6 +111,6 @@ jobs:
context: .
push: true
tags: |
${{ github.repository }}:test_image_${{ github.ref_name }}
${{ github.repository }}:test_image_${{ steps.branch.outputs.GHR }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache
cache-to: type=registry,ref=${{ github.repository }}:buildcache,mode=max

0 comments on commit 70a08e3

Please sign in to comment.