Skip to content

Check Banner

Check Banner #13616

Workflow file for this run

name: "Check Banner"
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
jobs:
script:
name: Script
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout data
uses: actions/checkout@v4
with:
ref: data
path: data
filter: blob:none
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache node modules
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Create local changes
timeout-minutes: 15
run: npm run check-banner
env:
GAME_ACCOUNT: ${{ secrets.GAME_ACCOUNT }}
GAME_SECRET: ${{ secrets.GAME_SECRET }}
DC_WEBHOOK: ${{ secrets.DC_WEBHOOK }}
NODE_ENV: production
- run: |
cd data
git pull --rebase --autostash
- name: Commit files
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 更新Banner資料
repository: data