Skip to content

Commit

Permalink
Merge pull request #651 from caponetto/sanitize-ref-name
Browse files Browse the repository at this point in the history
chore(ci): Sanitize ref name before using it as container tag
  • Loading branch information
openshift-merge-bot[bot] authored Jul 31, 2024
2 parents 37df13c + fb58f36 commit 4520c93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-notebooks-TEMPLATE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ jobs:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
- name: "push|schedule: make ${{ inputs.target }}"
run: "make ${{ inputs.target }}"
run: |
SANITIZED_REF_NAME=$(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9._-]/_/g')
export IMAGE_TAG="${SANITIZED_REF_NAME}_${{ github.sha }}"
make ${{ inputs.target }}
if: ${{ fromJson(inputs.github).event_name == 'push' || fromJson(inputs.github).event_name == 'schedule' }}
env:
IMAGE_TAG: "${{ github.ref_name }}_${{ github.sha }}"
IMAGE_REGISTRY: "ghcr.io/${{ github.repository }}/workbench-images"
CONTAINER_BUILD_CACHE_ARGS: "--cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"

Expand Down

0 comments on commit 4520c93

Please sign in to comment.