@@ -58,26 +58,29 @@ jobs:
5858 else
5959 echo "commit_changes=true" >> "$GITHUB_OUTPUT"
6060 fi
61- - name : Download ghcommit CLI
62- if : steps.check-changes.outputs.commit_changes == 'true'
63- run : |
64- curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L
65- chmod +x /usr/local/bin/ghcommit
6661 - name : Pick a branch name
6762 if : steps.check-changes.outputs.commit_changes == 'true'
6863 id : define-branch
6964 run : echo "branch=ci/update-docker-build-image-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
70- - name : Create branch
65+ - name : Commit changes
7166 if : steps.check-changes.outputs.commit_changes == 'true'
67+ id : create-commit
7268 run : |
73- git checkout -b ${{ steps.define-branch.outputs.branch }}
74- git push -u origin ${{ steps.define-branch.outputs.branch }} --force
75- - name : Commit and push changes
69+ git config user.name "github-actions[bot]"
70+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
71+ git commit -m "feat(ci): Update Docker build image" .gitlab-ci.yml
72+ echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
73+ - name : Push changes
74+ uses : DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
7675 if : steps.check-changes.outputs.commit_changes == 'true'
77- env :
78- GITHUB_TOKEN : ${{ steps.octo-sts.outputs.token }}
79- run : |
80- ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add .gitlab-ci.yml --message "feat(ci): Update Docker build image"
76+ with :
77+ token : " ${{ steps.octo-sts.outputs.token }}"
78+ branch : " ${{ steps.define-branch.outputs.branch }}"
79+ # for scheduled runs, sha is the tip of the default branch
80+ # for dispatched runs, sha is the tip of the branch it was dispatched on
81+ branch-from : " ${{ github.sha }}"
82+ command : push
83+ commits : " ${{ steps.create-commit.outputs.commit }}"
8184 - name : Create pull request
8285 if : steps.check-changes.outputs.commit_changes == 'true'
8386 env :
0 commit comments