Skip to content

Perform traffic logs #4

Perform traffic logs

Perform traffic logs #4

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-kintone-cli.min.js --config ./config.json
working-directory: traffic-logs