Skip to content

Commit 442ab11

Browse files
committed
ci(gh-actions/update-flake-lock): Enable GPG commit signing
1 parent 080d1d8 commit 442ab11

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
default: ''
1515
required: false
1616
type: string
17+
sign-commits:
18+
description: 'Enable GPG commit signing'
19+
default: false
20+
required: false
21+
type: boolean
1722

1823
secrets:
1924
NIX_GITHUB_TOKEN:
@@ -31,6 +36,9 @@ on:
3136
CREATE_PR_APP_PRIVATE_KEY:
3237
description: Private key of the GitHub App used for opening pull requests.
3338
required: true
39+
GPG_SIGNING_KEY:
40+
description: GPG private key used to sign commits
41+
required: false
3442

3543
outputs:
3644
pr-url:
@@ -61,6 +69,12 @@ jobs:
6169
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
6270
substituters: ${{ vars.SUBSTITUTERS }}
6371

72+
- name: Configure GPG Key
73+
env:
74+
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
75+
run: |
76+
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
77+
6478
- name: Run `nix flake update`
6579
id: update-lockfile
6680
run: |

0 commit comments

Comments
 (0)