@@ -39,13 +39,24 @@ runs:
39
39
echo "can_push=true" >> $GITHUB_OUTPUT
40
40
fi
41
41
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
+
42
51
# 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
44
53
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
45
54
if : steps.can-push.outputs.can_push == 'true'
46
55
with :
47
56
ref : ${{ github.head_ref }}
48
57
fetch-depth : 0
58
+ token : ${{ steps.app-token.outputs.token }}
59
+ persist-credentials : false
49
60
50
61
- name : Run ${{ inputs.fix-task }}
51
62
if : steps.can-push.outputs.can_push == 'true'
70
81
71
82
- name : commit ${{ inputs.fix-task }} changes
72
83
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
74
85
with :
75
86
commit_message : ${{ steps.set-commit-message.outputs.commit-message }}
76
87
commit_options : ' --no-verify --signoff'
0 commit comments