From e4c75070beffaabee69a5a0da5a53aa0afd5cb28 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Tue, 24 Nov 2026 12:08:35 +0000 Subject: [PATCH] ci: Mint tokens from the tooling App bump-go passes the tooling App on to the shared workflow, which mints a token from it instead of using GH_PAT. Until the App is set up for this repository, it falls back to gh_pat. And tooling-app checks that the key matches its fingerprint, like in x. Signed-off-by: Justin Chadwell --- .github/workflows/bump-go.yaml | 3 +++ .github/workflows/tooling-app.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/tooling-app.yaml diff --git a/.github/workflows/bump-go.yaml b/.github/workflows/bump-go.yaml index 2f2ee7a..7236d3b 100644 --- a/.github/workflows/bump-go.yaml +++ b/.github/workflows/bump-go.yaml @@ -11,5 +11,8 @@ permissions: jobs: bump-go: uses: unikraft-cloud/x/.github/workflows/bump-go.yaml@prod-staging + with: + gh_client_id: ${{ vars.TOOLING_APP_CLIENT_ID }} secrets: gh_pat: ${{ secrets.GH_PAT }} + gh_private_key: ${{ secrets.TOOLING_APP_PRIVATE_KEY }} diff --git a/.github/workflows/tooling-app.yaml b/.github/workflows/tooling-app.yaml new file mode 100644 index 0000000..02434ca --- /dev/null +++ b/.github/workflows/tooling-app.yaml @@ -0,0 +1,27 @@ +name: tooling-app + +on: + schedule: + # Changing a secret doesn't trigger a run, so catch a swapped key here. + - cron: '0 9 * * 1' + workflow_dispatch: + push: + branches: [prod-staging] + pull_request: + branches: [prod-staging] + paths: + - .github/workflows/tooling-app.yaml + +permissions: + contents: read + +jobs: + # The fingerprint names the key of this repository on the tooling App's page. + app-key: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: unikraft-cloud/x/.github/actions/check-key-fingerprint@prod-staging + with: + private-key: ${{ secrets.TOOLING_APP_PRIVATE_KEY }} + fingerprint: ${{ vars.TOOLING_APP_PRIVATE_KEY_FINGERPRINT }}