Skip to content

Commit

Permalink
chore: Use GitHub App authentication to generate "checkout tokens"
Browse files Browse the repository at this point in the history
This commit switches the `build.yml` workflow over to use GitHub App
tokens to checkout the nillion repo (private) instead of relying on
PATs, which expire and have to be manually rotated.

Instead, I created a GitHub App named "Nillion Repo" at the org-level. I
gave the app read-only access to the nillion repo. And I added 1
repo-variable and 1 repo-secret to the nada-dsl repo:

* Variable: `NILLION_REPO_APP_ID`
* Secret: `NILLION_REPO_APP_PRIVATE_KEY`
  • Loading branch information
jwolski2 committed Nov 15, 2024
1 parent cfddbb9 commit 2cc56bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Generate Nillion Repo app token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.NILLION_REPO_APP_ID }}
private-key: ${{ secrets.NILLION_REPO_APP_PRIVATE_KEY }}
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: NillionNetwork/nillion
path: nillion
token: ${{ secrets.NILLION_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
- name: Replace nillion's nada_dsl with this version
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 2cc56bf

Please sign in to comment.