@@ -15,12 +15,18 @@ jobs:
15
15
name : Checkout
16
16
runs-on : ubuntu-latest
17
17
steps :
18
+ - uses : actions/create-github-app-token@v1
19
+ id : merge-app-token
20
+ with :
21
+ app-id : ${{ vars.MERGE_APP_ID }}
22
+ private-key : ${{ secrets.MERGE_APP_SECRET }}
18
23
- uses : actions/checkout@v3
19
24
- uses : actions/setup-node@v3
20
25
with :
21
26
node-version : 18.x
22
27
cache : yarn
23
28
cache-dependency-path : ' **/yarn.lock'
29
+ token : ${{ steps.merge-app-token.outputs.token }}
24
30
25
31
- name : Ensure that we are running on `main`
26
32
if : github.ref != 'refs/heads/main'
73
79
run : |
74
80
git config user.name "github-actions"
75
81
git config user.email "github-actions@github.com"
76
- git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}
77
82
git add versions.json
78
- git commit -m "chore: update app version to ${{ steps.set-app-version.outputs.new_app_version }}"
79
- git rebase --origin main
80
- git push
81
-
82
- #BRANCH_NAME="bump-app-version-${{ github.run_id }}"
83
- #git checkout -b "$BRANCH_NAME"
84
-
85
- #git add versions.json
86
- #git commit -m "chore: update app version to ${{ steps.set-app-version.outputs.new_app_version }}"
87
- #git push origin "$BRANCH_NAME"
88
-
89
- ## Create and auto-merge PR
90
- #gh pr create --title "chore: bump app version to ${{ steps.set-app-version.outputs.new_app_version }}" \
91
- # --body "This PR was auto-generated by GitHub Actions." \
92
- # --base main \
93
- # --head "$BRANCH_NAME"
94
- #
95
- #gh pr merge "$BRANCH_NAME" --auto --squash --delete-branch
83
+ git commit -m "chore: bump app version to ${{ steps.set-app-version.outputs.new-app_version }}"
84
+ git pull --rebase origin main
85
+ git push origin "$BRANCH_NAME"
0 commit comments