Skip to content

Commit 27aaf14

Browse files
Use workflow-pr-fixer app for Token Auth on fixup commits
1 parent c789f9b commit 27aaf14

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/actions/gradle-task-with-commit/action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,24 @@ runs:
3939
echo "can_push=true" >> $GITHUB_OUTPUT
4040
fi
4141
42+
# We use the workflow-pr-fixer app to authenticate and get a token that will cause the workflow
43+
# to be triggered again.
44+
- name: Generate App Token
45+
uses: actions/create-github-app-token@v2
46+
id: app-token
47+
with:
48+
app-id: ${{ vars.APP_ID }}
49+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
50+
4251
# ensure that we have the actual branch checked out. By default, actions/checkout is headless.
43-
- name: check out with PAT
52+
- name: check out with the generated app token
4453
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4554
if: steps.can-push.outputs.can_push == 'true'
4655
with:
4756
ref: ${{ github.head_ref }}
4857
fetch-depth: 0
58+
token: ${{ steps.app-token.outputs.token }}
59+
persist-credentials: false
4960

5061
- name: Run ${{ inputs.fix-task }}
5162
if: steps.can-push.outputs.can_push == 'true'
@@ -70,7 +81,7 @@ runs:
7081
7182
- name: commit ${{ inputs.fix-task }} changes
7283
if: steps.can-push.outputs.can_push == 'true'
73-
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5
84+
uses: stefanzweifel/git-auto-commit-action@v6
7485
with:
7586
commit_message: ${{ steps.set-commit-message.outputs.commit-message }}
7687
commit_options: '--no-verify --signoff'

0 commit comments

Comments
 (0)