Skip to content

Commit 4379536

Browse files
committed
fix(gh-actions/update-{flake-lock,flake-packages}): Pass all secrets used by the action on workflow_call
1 parent 875d44f commit 4379536

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/update-flake-lock.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
NIX_GITHUB_TOKEN:
88
description: GitHub token to add as access-token in nix.conf
99
required: false
10+
CREATE_PR_APP_ID:
11+
description: ID of the GitHub App used for opening pull requests.
12+
required: true
13+
CREATE_PR_APP_PRIVATE_KEY:
14+
description: Private key of the GitHub App used for opening pull requests.
15+
required: true
1016

1117
# Allow this workflow to be triggered manually:
1218
workflow_dispatch:
@@ -47,8 +53,8 @@ jobs:
4753
- uses: tibdex/[email protected]
4854
id: generate-token
4955
with:
50-
app_id: ${{ secrets.APP_ID }}
51-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
56+
app_id: ${{ secrets.CREATE_PR_APP_ID }}
57+
private_key: ${{ secrets.CREATE_PR_APP_PRIVATE_KEY }}
5258

5359
- name: Create Pull Request
5460
if: ${{ hashFiles('commit_msg_body.txt') != '' }}

.github/workflows/update-flake-packages.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
NIX_GITHUB_TOKEN:
88
description: GitHub token to add as access-token in nix.conf
99
required: false
10+
CREATE_PR_APP_ID:
11+
description: ID of the GitHub App used for opening pull requests.
12+
required: true
13+
CREATE_PR_APP_PRIVATE_KEY:
14+
description: Private key of the GitHub App used for opening pull requests.
15+
required: true
1016

1117
# Allow this workflow to be triggered manually:
1218
workflow_dispatch:
@@ -39,8 +45,8 @@ jobs:
3945
- uses: tibdex/[email protected]
4046
id: generate-token
4147
with:
42-
app_id: ${{ secrets.APP_ID }}
43-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
48+
app_id: ${{ secrets.CREATE_PR_APP_ID }}
49+
private_key: ${{ secrets.CREATE_PR_APP_PRIVATE_KEY }}
4450

4551
- name: Update flake packages
4652
uses: metacraft-labs/nix-update-action@main

0 commit comments

Comments
 (0)