Skip to content

Commit 95e3e29

Browse files
committed
fixup! ci: custom update-flake with sign commits
1 parent 3a190d7 commit 95e3e29

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,23 @@ jobs:
2424

2525
- name: Commit changes
2626
run: |
27-
set -x
28-
CHANGED=($(git diff --name-only))
27+
mapfile -t CHANGED < <(git diff --name-only | xargs)
2928
3029
# TODO: use an array for $FILES
3130
for value in "${CHANGED[@]}"; do
3231
FILES="${FILES} -F files[][path]=$value -F files[][contents]=$(base64 -w0 $value)"
3332
done
3433
34+
git checkout -b $BRANCH
35+
git push -u origin $BRANCH --force
36+
3537
gh api graphql \
3638
-F githubRepository=$GITHUB_REPOSITORY \
3739
-F branchName=$BRANCH \
3840
-F expectedHeadOid=$(git rev-parse HEAD) \
3941
-F commitMessage="chore: update flake.lock" \
4042
-F 'query=@.github/api/createCommitOnBranch.gql' \
41-
${FILES} \
42-
| jq
43+
${FILES}
4344
env:
4445
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4546
BRANCH: chore/update-flake-lock

0 commit comments

Comments
 (0)