From 97e3b47a0c4fd6c4ba67136dabde664da32a9d51 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Mon, 24 Apr 2023 11:23:30 +0200 Subject: [PATCH] fix: reverted to update-v8.yml --- .github/workflows/tools.yml | 12 ------- .github/workflows/update-v8.yml | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/update-v8.yml diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 7c4253a995d30b..4578deb00d8eee 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -252,23 +252,11 @@ jobs: cat temp-output tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output - - id: v8 - subsystem: deps - label: dependencies - run: | - ./tools/dep_updaters/update-v8-patch.sh > temp-output - cat temp-output - tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true - rm temp-output steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id with: persist-credentials: false - - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 - if: matrix.id == 'v8' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id) - with: - path: ~/.update-v8/v8 - run: ${{ matrix.run }} if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id env: diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml new file mode 100644 index 00000000000000..ec33d94b64c96e --- /dev/null +++ b/.github/workflows/update-v8.yml @@ -0,0 +1,56 @@ +name: V8 update +on: + schedule: + # Run once a week at 00:05 AM UTC on Sunday. + - cron: 5 0 * * 0 + workflow_dispatch: + +env: + NODE_VERSION: lts/* + +permissions: + contents: read + +jobs: + v8-update: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + persist-credentials: false + - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + with: + path: | + ~/.update-v8 + ~/.npm + # Install dependencies + - name: Install Node.js + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Install node-core-utils + run: npm install -g node-core-utils@latest + - name: Check and download new V8 version + run: | + ./tools/dep_updaters/update-v8-patch.sh > temp-output + cat temp-output + tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true + rm temp-output + - name: Generate commit message if not set + if: env.COMMIT_MSG == '' + run: | + echo "COMMIT_MSG=deps: update v8 to ${{ env.NEW_VERSION }}" >> "$GITHUB_ENV" + - uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 + # Creates a PR or update the Action's existing PR, or + # no-op if the base branch is already up-to-date. + env: + GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} + with: + author: Node.js GitHub Bot + body: This is an automated update of v8 to ${{ env.NEW_VERSION }}. + branch: actions/update-v8-${{ matrix.id }} # Custom branch *just* for this Action. + commit-message: ${{ env.COMMIT_MSG }} + labels: dependencies + title: 'deps: update v8 to ${{ env.NEW_VERSION }}' + update-pull-request-title-and-body: true