Update canary branch #1406
This file contains 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: Update canary branch | |
on: | |
schedule: | |
- cron: '0 6 * * *' | |
workflow_dispatch: | |
env: | |
CC: clang | |
CXX: clang++ | |
jobs: | |
updateCanary: | |
name: Update the canary branch | |
if: github.repository == 'nodejs/node-v8' || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Clone node-v8 | |
uses: actions/checkout@v4 | |
with: | |
path: node-v8 | |
token: ${{ secrets.CANARY_UPDATE }} | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm install -g @node-core/utils | |
- name: Cache V8 clone | |
uses: actions/cache@v4 | |
with: | |
path: v8 | |
key: v8-clone | |
- name: Execute the update script | |
run: ./node-v8/tools/update-canary.sh | |
- name: Notify Slack on failure | |
if: ${{ failure() }} | |
run: | | |
ACTIONS_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true" | |
SLACK_PAYLOAD="{\"username\": \"canary_bot\", \"text\": \"*Canary update failed!*\n\nRun: ${ACTIONS_URL}\", \"icon_emoji\": \":bell:\"}" | |
curl -X POST --data-urlencode "payload=${SLACK_PAYLOAD}" ${{ secrets.SLACK_WEBHOOK }} |