From cdfd8341445f80760495a2451e171c49c6edf178 Mon Sep 17 00:00:00 2001 From: Vadim Peretokin Date: Mon, 23 Dec 2024 07:03:07 +0100 Subject: [PATCH] Infrastructure: Fix code signing to only run on the main repo (#7581) #### Brief overview of PR changes/additions Fix code signing to only run on the main repo - so far it either tried to run on forks or refused to run in the main repo. #### Motivation for adding to Mudlet Sign builds for Mudlet only when the Azure secret is available. #### Other info (issues closed, discussion etc) --- .github/workflows/build-mudlet-win.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-mudlet-win.yml b/.github/workflows/build-mudlet-win.yml index 95125b22308..e614fcd770f 100644 --- a/.github/workflows/build-mudlet-win.yml +++ b/.github/workflows/build-mudlet-win.yml @@ -86,13 +86,13 @@ jobs: - name: (Windows) Login to Azure uses: azure/login@v2 - if: ${{ github.event.pull_request.head.repo.full_name == 'Mudlet/Mudlet' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository with: creds: ${{ secrets.AZURE_CREDENTIALS }} - name: Get Azure access token for code signing shell: pwsh - if: ${{ github.event.pull_request.head.repo.full_name == 'Mudlet/Mudlet' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository run: | $token = (az account get-access-token --resource https://codesigning.azure.net | ConvertFrom-Json).accessToken "::add-mask::$token"