Skip to content

Commit 34ff438

Browse files
committed
fix(ci): Fix command substitution in update flake.lock CI job
1 parent 9e0c714 commit 34ff438

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

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

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
# CI job to periodically (once a week) update flake.lock
22
name: Update flake dependencies
3-
43
on:
54
schedule:
65
- cron: '0 16 * * 5'
76
workflow_dispatch: # for allowing manual triggers of the workflow
8-
97
jobs:
108
update-dependencies:
119
runs-on: ubuntu-latest
1210
steps:
13-
- uses: actions/checkout@v4
14-
- uses: DeterminateSystems/nix-installer-action@main
15-
- uses: DeterminateSystems/magic-nix-cache-action@main
16-
- name: update flake.lock
17-
run: nix flake update
18-
- name: Create signed commit with flake.lock changes
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
FILE_TO_COMMIT: flake.lock
22-
COMMIT_BRANCH: automation/update-flake-dependencies
23-
COMMIT_MESSAGE: "chore(nix): Update Flake dependencies"
24-
run: |
11+
- uses: actions/checkout@v4
12+
- uses: DeterminateSystems/nix-installer-action@main
13+
- uses: DeterminateSystems/magic-nix-cache-action@main
14+
- name: update flake.lock
15+
run: nix flake update
16+
- name: Create signed commit with flake.lock changes
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
FILE_TO_COMMIT: flake.lock
20+
COMMIT_BRANCH: automation/update-flake-dependencies
21+
COMMIT_MESSAGE: "chore(nix): Update Flake dependencies"
22+
run: |
2523
# make sure something actually changed first, if not, no updates required
2624
if [[ `git status --porcelain` ]]; then
2725
# create the branch on the remote
@@ -30,7 +28,7 @@ jobs:
3028
# commit via the GitHub API so we get automatic commit signing
3129
gh api --method PUT /repos/1Password/shell-plugins/contents/$FILE_TO_COMMIT \
3230
--field message="$COMMIT_MESSAGE" \
33-
--field content=@<(base64 -i $FILE_TO_COMMIT) \
31+
--field content="$(base64 -w 0 $FILE_TO_COMMIT)" \
3432
--field branch="$COMMIT_BRANCH" \
3533
--field sha="$(git rev-parse $COMMIT_BRANCH:$FILE_TO_COMMIT)"
3634
gh pr create --title "[automation]: Update Flake dependencies" \

0 commit comments

Comments
 (0)