Skip to content

Commit 02177bc

Browse files
authored
refactor(action): auto-commit resilience (#4658)
* Update action.yml * refactor: prettier
1 parent 0defc04 commit 02177bc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/actions/auto-commit/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ inputs:
2424
runs:
2525
using: "composite"
2626
steps:
27-
# https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
28-
- name: 🧬 Generate a token
29-
id: generate-token
30-
uses: actions/create-github-app-token@v2
31-
with:
32-
app-id: ${{ inputs.auto-merge-app-id }}
33-
private-key: ${{ inputs.auto-merge-private-key }}
34-
3527
- name: 🏗️ Create new branch and commit changes
3628
shell: bash
3729
env:
@@ -61,6 +53,14 @@ runs:
6153
run: |
6254
gh pr create --base "$BASE_BRANCH" --head "$NEW_PR_BRANCH" --title "Automated PR: $COMMIT_MESSAGE" --body "This PR was created automatically by a GitHub Action."
6355
56+
# https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
57+
- name: 🧬 Generate a token
58+
id: generate-token
59+
uses: actions/create-github-app-token@v2
60+
with:
61+
app-id: ${{ inputs.auto-merge-app-id }}
62+
private-key: ${{ inputs.auto-merge-private-key }}
63+
6464
- name: 🤖 Squash the PR
6565
shell: bash
6666
run: gh pr merge --squash "$NEW_PR_BRANCH"

0 commit comments

Comments
 (0)