From 5711069f6c95eb0ab8ed0da3f3ed44d8762c6ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89=E9=B8=AD=E8=9B=8B?= Date: Mon, 14 Oct 2024 22:20:30 +0800 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 457c3ae6..462f504e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,26 +1,32 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +name: Build repo.json on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] jobs: build: runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. + contents: write strategy: matrix: node-version: [18.x] steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: node ./build/build.js + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: update repo.json