From b2dba9d20c50e8628fda0eedca9e559e4caae300 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Mon, 4 Nov 2024 13:58:52 +0100 Subject: [PATCH] fix: sanitize ref names --- .github/workflows/build-wasm-internal.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wasm-internal.yml b/.github/workflows/build-wasm-internal.yml index 99b4f05a..4a3ac708 100644 --- a/.github/workflows/build-wasm-internal.yml +++ b/.github/workflows/build-wasm-internal.yml @@ -26,13 +26,15 @@ jobs: - name: Set version (PR) if: ${{ github.event_name == 'pull_request' }} run: | - echo REF_NAME="${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - echo SHA="${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV + export REF_NAME="${{ github.event.pull_request.head.ref }}" + export SHA="${{ github.event.pull_request.head.sha }}" + echo REF_NAME="${REF_NAME/\//-}" >> $GITHUB_ENV + echo SHA="${SHA}" >> $GITHUB_ENV - name: Set env variables (Branch/Tag) if: ${{ github.event_name == 'push' }} run: | - echo REF_NAME="${GITHUB_REF_NAME}" >> $GITHUB_ENV + echo REF_NAME="${GITHUB_REF_NAME/\//-}" >> $GITHUB_ENV echo SHA="${GITHUB_SHA}" >> $GITHUB_ENV - name: Set version