Skip to content

Commit c5476b6

Browse files
VachaShahzelinh
authored andcommitted
Using Github App token to trigger CI for version increment PRs (#116)
Signed-off-by: Vacha Shah <vachshah@amazon.com> Signed-off-by: Zelin Hao <zelinhao@amazon.com>
1 parent 2d29b49 commit c5476b6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/version.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
env:
12-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1311
steps:
12+
- name: GitHub App token
13+
id: github_app_token
14+
uses: tibdex/github-app-token@v1.5.0
15+
with:
16+
app_id: ${{ secrets.APP_ID }}
17+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
18+
installation_id: 22958780
19+
1420
- uses: actions/checkout@v2
1521
- name: Fetch Tag and Version Information
1622
run: |
@@ -27,13 +33,17 @@ jobs:
2733
- uses: actions/checkout@v2
2834
with:
2935
ref: ${{ env.BASE }}
36+
token: ${{ steps.github_app_token.outputs.token }}
37+
3038
- name: Increment Version
3139
run: |
3240
echo Incrementing $CURRENT_VERSION to $NEXT_VERSION
3341
sed -i "s/$CURRENT_VERSION-SNAPSHOT/$NEXT_VERSION-SNAPSHOT/g" build.gradle
42+
3443
- name: Create Pull Request
3544
uses: peter-evans/create-pull-request@v3
3645
with:
46+
token: ${{ steps.github_app_token.outputs.token }}
3747
base: ${{ env.BASE }}
3848
commit-message: Incremented version to ${{ env.NEXT_VERSION }}
3949
delete-branch: true

0 commit comments

Comments
 (0)