File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments