@@ -11,31 +11,25 @@ concurrency:
1111
1212jobs :
1313 build :
14+ if : github.event.pull_request.merged == true
1415 runs-on : ubuntu-24.04
1516
1617 steps :
17- - uses : actions/checkout@v4
18+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1819
19- - name : Prepare git
20- env :
21- GITHUB_USER : 1gtm
22- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
23- run : |
24- git config --global user.name "${GITHUB_USER}"
25- git config --global user.email "${GITHUB_USER}@appscode.com"
26- git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
27-
28- - name : Install GitHub CLI
29- run : |
30- curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
31- sudo mv bin/hub /usr/local/bin
20+ - name : Generate LGTM App token
21+ id : lgtm-app-token
22+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
23+ with :
24+ client-id : ${{ secrets.LGTM_APP_CLIENT_ID }}
25+ private-key : ${{ secrets.LGTM_APP_PRIVATE_KEY }}
26+ owner : ${{ github.repository_owner }}
27+ repositories : CHANGELOG
28+ permission-pull-requests : write
3229
3330 - name : Update release tracker
34- if : |
35- github.event.action == 'closed' &&
36- github.event.pull_request.merged == true
3731 env :
38- GITHUB_USER : 1gtm
39- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
32+ GITHUB_USER : ${{ github.actor }}
33+ GITHUB_TOKEN : ${{ steps.lgtm-app-token.outputs.token }}
4034 run : |
4135 ./hack/scripts/update-release-tracker.sh
0 commit comments