File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,23 @@ jobs:
4242 - name : Append release to Cloud Foundry repository
4343 run : |
4444 echo "${{ steps.get-release-version.outputs.VERSION }}: ${{ steps.get-release-url.outputs.URL }}" >> index.yml
45- - name : Commit and push changes
46- uses : planetscale/ghcommit-action@f24050e41f8694750427d111b52f4ef9ca81a32d # v0.2.18
45+ - name : Commit changes
46+ id : create-commit
47+ run : |
48+ git config user.name "github-actions[bot]"
49+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
50+
51+ if [[ -z "$(git status -s)" ]]; then
52+ echo "No changes to commit, exiting."
53+ exit 0;
54+ fi
55+
56+ git commit -a -m "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
57+ echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
58+ - name : Push changes
59+ uses : DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
60+ if : ${{ steps.create-commit.outputs.commit != '' }}
4761 with :
48- commit_message : " chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
49- repo : ${{ github.repository }}
5062 branch : cloudfoundry
51- env :
52- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
63+ command : push
64+ commits : " ${{ steps.create-commit.outputs.commit }} "
You can’t perform that action at this time.
0 commit comments