Skip to content

Commit f6efb54

Browse files
authored
Update non-Default GitHub token usage to Mu GitHub app (#219)
## Description Generates tokens during workflow execution instead of directly depending on PATs. - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested CI Run ## Integration Instructions No integration necessary. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
1 parent a9131c7 commit f6efb54

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/prepare-binaries.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ jobs:
3434
- name: Checkout Self
3535
uses: actions/checkout@v4
3636

37+
- name: Generate Token
38+
if: github.event_name == 'release'
39+
id: app-token
40+
uses: actions/create-github-app-token@v2
41+
with:
42+
app-id: ${{ vars.MU_ACCESS_APP_ID }}
43+
private-key: ${{ secrets.MU_ACCESS_APP_PRIVATE_KEY }}
44+
owner: ${{ github.repository_owner }}
45+
3746
- name: Set up Python
3847
uses: actions/setup-python@v5
3948
with:
@@ -79,7 +88,7 @@ jobs:
7988
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.event.release.tag_name, '-signed')
8089
with:
8190
files: ReleaseFirmwareArchive/*
82-
token: ${{ secrets.GH_UEFI_BOT_PUBLISH_TOKEN }}
91+
token: ${{ steps.app-token.outputs.token }}
8392

8493
- name: Prepare Release Signed Archive
8594
run: python scripts/prepare_signed_binaries.py PostSignedObjects --output ReleaseSignedArtifacts --version ${{ github.event.release.tag_name }}
@@ -90,4 +99,4 @@ jobs:
9099
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.event.release.tag_name, '-signed')
91100
with:
92101
files: ReleaseSignedArtifacts/*
93-
token: ${{ secrets.GH_UEFI_BOT_PUBLISH_TOKEN }}
102+
token: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)