-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (32 loc) · 1.05 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Update
on:
schedule:
- cron: '0 23 */2 * *'
workflow_dispatch:
jobs:
update-node-version:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Update
id: update
run: bash .github/scripts/update.sh
- name: Create update PR
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.TOKEN }}
author: "Node.js GitHub Bot <[email protected]>"
branch: update-branch
branch-suffix: short-commit-hash
base: main
commit-message: "Bump Node.js version to ${{ steps.update.outputs.version }}"
title: "Bump Node.js version to ${{ steps.update.outputs.version }}"
delete-branch: true
- name: Auto approve and merge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: |
gh pr merge -R "${{ github.repository }}" --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}