Skip to content

Commit bacf045

Browse files
committed
ci(on-main): mint dfcg-artifacts token via GitHub App instead of a PAT
Completes the migration off the DFCG_ARTIFACTS_ACCESS_TOKEN PAT (already removed as a repo secret): the website-deploy workflow now mints a short-lived contents:read token from the blocksense-ci-token-provider App (app 3205470), scoped to dfcg-artifacts, the same as ci.yml. Drops the top-level PAT env and sets DFCG_ARTIFACTS_ACCESS_TOKEN only on the Build step from the minted token.
1 parent b6d6826 commit bacf045

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/on-main.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- main
77

88
env:
9-
DFCG_ARTIFACTS_ACCESS_TOKEN: ${{ secrets.DFCG_ARTIFACTS_ACCESS_TOKEN }}
109
RPC_URL_ETHEREUM_SEPOLIA: ${{ secrets.RPC_URL_ETHEREUM_SEPOLIA }}
1110
RPC_URL_INK_SEPOLIA: ${{ secrets.RPC_URL_INK_SEPOLIA }}
1211
METALS_API_KEY: ${{ secrets.METALS_API_KEY }}
@@ -34,6 +33,19 @@ jobs:
3433
steps:
3534
- uses: actions/checkout@v6
3635

36+
# Mint a short-lived, contents:read token for the private
37+
# dfcg-artifacts repo via the blocksense-ci-token-provider GitHub
38+
# App, replacing the long-lived DFCG_ARTIFACTS_ACCESS_TOKEN PAT.
39+
- name: Mint dfcg-artifacts token
40+
id: dfcg-token
41+
uses: actions/create-github-app-token@v1
42+
with:
43+
app-id: ${{ secrets.CI_TOKEN_PROVIDER_APP_ID }}
44+
private-key: ${{ secrets.CI_TOKEN_PROVIDER_PRIVATE_KEY }}
45+
owner: blocksense-network
46+
repositories: dfcg-artifacts
47+
permission-contents: read
48+
3749
- name: Build & activate the Nix Dev Shell
3850
run: |
3951
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.js || echo exit 1)"
@@ -44,6 +56,7 @@ jobs:
4456

4557
- name: Build
4658
env:
59+
DFCG_ARTIFACTS_ACCESS_TOKEN: ${{ steps.dfcg-token.outputs.token }}
4760
NEXT_PUBLIC_VERIFICATION_API_KEY: ${{ secrets.NEXT_PUBLIC_VERIFICATION_API_KEY }}
4861
NEXT_PUBLIC_VERIFICATION_API_URL: ${{ secrets.NEXT_PUBLIC_VERIFICATION_API_URL }}
4962
id: build

0 commit comments

Comments
 (0)