Skip to content

Commit

Permalink
Infrastructure: Fix code signing to only run on the main repo (Mudlet…
Browse files Browse the repository at this point in the history
…#7581)

<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
#### 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)
  • Loading branch information
vadi2 authored Dec 23, 2024
1 parent c53beb6 commit cdfd834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-mudlet-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cdfd834

Please sign in to comment.