File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,24 @@ jobs:
1111 steps :
1212 - name : Checkout code
1313 uses : actions/checkout@v3
14+
15+ - name : Generate GitHub App Token
16+ id : generate-token
17+ uses : actions/create-github-app-token@v1
18+ with :
19+ app-id : ${{ secrets.MADGRADES_AUTOMATOR_APP_ID }}
20+ private-key : ${{ secrets.MADGRADES_AUTOMATOR_PRIVATE_KEY }}
21+
1422 - name : Login to Github Packages
1523 uses : docker/login-action@v2
1624 with :
1725 registry : ghcr.io
18- username : ${{ secrets.PUBLISHING_GITHUB_USERNAME }}
19- password : ${{ secrets.PUBLISHING_GITHUB_TOKEN }}
26+ username : ${{ github.repository_owner }}
27+ password : ${{ steps.generate-token.outputs.token }}
2028 - name : Build image and push
2129 uses : docker/build-push-action@v2
2230 with :
2331 context : ./
2432 tags : |
2533 ghcr.io/madgrades/madgrades-data:latest
26- push : ${{ github.ref == 'refs/heads/main' }}
34+ push : ${{ github.ref == 'refs/heads/main' }}
Original file line number Diff line number Diff line change 66 notify :
77 runs-on : ubuntu-latest
88 steps :
9+ - name : Generate GitHub App Token
10+ id : generate-token
11+ uses : actions/create-github-app-token@v1
12+ with :
13+ app-id : ${{ secrets.MADGRADES_AUTOMATOR_APP_ID }}
14+ private-key : ${{ secrets.MADGRADES_AUTOMATOR_PRIVATE_KEY }}
15+
916 - name : Trigger submodule-updated workflow in Madgrades/reports
1017 run : |
1118 curl -X POST \
1219 -H "Accept: application/vnd.github.v3+json" \
13- -H "Authorization: token ${{ secrets.ACTIONS_GITHUB_TOKEN }}" \
20+ -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \
1421 https://api.github.com/repos/Madgrades/reports/dispatches \
1522 -d '{"event_type":"submodule-updated"}'
You can’t perform that action at this time.
0 commit comments