Skip to content

Commit e017d98

Browse files
committed
fixup! ci: custom update-flake with sign commits
1 parent a7eb80e commit e017d98

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,21 @@ jobs:
2424

2525
- name: Commit changes
2626
run: |
27-
CHANGED=($(git diff --name-only | xargs))
27+
CHANGED=($(git diff --name-only))
28+
29+
# TODO: use an array for $FILES
30+
for value in "${CHANGED[@]}"; do
31+
FILES="${FILES} -F files[][path]=$value -F files[][contents]=$(base64 -w0 $value)"
32+
done
33+
2834
gh api graphql \
2935
-F $githubRepository=$GITHUB_REPOSITORY \
3036
-F branchName=$BRANCH \
3137
-F expectedHeadOid=$(git rev-parse HEAD) \
3238
-F commitMessage="chore: update flake.lock" \
33-
-F 'query=@.github/api/createCommitOnBranch.gql'
34-
"${CHANGED[@]}"
39+
-F 'query=@.github/api/createCommitOnBranch.gql' \
40+
${FILES} \
41+
| jq
3542
env:
3643
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3744
BRANCH: chore/update-flake-lock

0 commit comments

Comments
 (0)