-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SSR-3278: Change traffic log program's authentication way from PAT to…
… GitHub App Token
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Perform traffic logs | ||
on: | ||
schedule: | ||
#every 9:00 UTC+0(18:00 JP Time) | ||
- cron: '0 9 * * *' | ||
jobs: | ||
check: | ||
name: Run traffic logs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Generate app token | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app_id: ${{secrets.TRAFFIC_LOGS_APP_ID}} | ||
private_key: ${{ secrets.TRAFFIC_LOGS_APP_PRIVATE_KEY }} | ||
- name: Update config file | ||
run: | | ||
sed -i 's|<kintone-app-id>|${{secrets.TRAFFIC_LOGS_KINTONE_APP_ID}}|' config.json | ||
sed -i 's|<domain>|${{secrets.TRAFFIC_LOGS_KINTONE_APP_DOMAIN}}|' config.json | ||
sed -i 's|<kintone-app-token>|${{secrets.TRAFFIC_LOGS_KINTONE_APP_API_TOKEN}}|' config.json | ||
working-directory: traffic-logs | ||
- name: Perform traffic logs with app token | ||
env: | ||
GITHUB_APP_TOKEN: ${{ steps.app-token.outputs.token }} | ||
run: | | ||
node traffic-logs-kuc.min.js --config ./config.json | ||
working-directory: traffic-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"kintone": { | ||
"app": "<kintone-app-id>", | ||
"domain": "<domain>", | ||
"apiToken": "<kintone-app-token>" | ||
}, | ||
"githubToken": "<github token>" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.