Auto Update #475
This file contains hidden or 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
| name: Auto Update | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| script: | |
| - "runtime.js" | |
| - "wasm-plugin.js" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Enable corepack | |
| run: | | |
| echo "Before: corepack version => $(corepack --version || echo 'not installed')" | |
| npm install -g corepack@latest | |
| echo "After : corepack version => $(corepack --version)" | |
| corepack enable | |
| pnpm --version | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Update | |
| run: node ./scripts/${{ matrix.script }} | |
| env: | |
| CRAWL_SECRET: ${{ secrets.CRAWL_SECRET }} | |
| - name: Commit | |
| uses: EndBug/add-and-commit@v4 | |
| with: | |
| author_name: SWC Bot | |
| author_email: [email protected] | |
| message: "chore: Run & Update cache" | |
| add: "cache" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.BOT_GH_TOKEN }} |