From 201125d003158bd70c1c6be15dd997f44cbf6044 Mon Sep 17 00:00:00 2001 From: Kilian von Pflugk Date: Thu, 19 Sep 2024 11:20:28 +0000 Subject: [PATCH] fix dependabot builds --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0afd89..702e333 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,14 @@ jobs: runs-on: ubuntu-latest steps: + - name: Sanitize head_ref + run: | + # Get the branch name and sanitize it + SANITIZED_BRANCH_NAME=$(echo "${{ github.head_ref }}" | sed 's/[^a-zA-Z0-9.-]/_/g') + + # Export it as an environment variable + echo "SANITIZED_BRANCH_NAME=$SANITIZED_BRANCH_NAME" >> $GITHUB_ENV + - uses: actions/checkout@v4 - name: Setup .NET @@ -62,7 +70,7 @@ jobs: uses: actions/upload-artifact@v4.3.6 if: github.event_name == 'pull_request' with: - name: ConfusedPolarBear.Plugin.IntroSkipper-${{ github.head_ref }}.dll + name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.SANITIZED_BRANCH_NAME }}.dll path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll retention-days: 7 if-no-files-found: error