Skip to content

Commit

Permalink
Update runtime to node 20 (#144)
Browse files Browse the repository at this point in the history
* Update runtime to node 20

* fix build
  • Loading branch information
peter-evans authored Jan 25, 2024
1 parent 87008db commit 52289dd
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run build-checkout
- run: npm run build
- run: NODE_OPTIONS=--openssl-legacy-provider npm run build
- run: npm run format-check
- run: npm run lint
- run: npm run test
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/update-major-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Major Version
run-name: Update ${{ github.event.inputs.main_version }} to ${{ github.event.inputs.target }}

on:
workflow_dispatch:
inputs:
target:
description: The target tag or reference
required: true
main_version:
type: choice
description: The major version tag to update
options:
- v3

jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
fetch-depth: 0
- name: Git config
run: |
git config user.name actions-bot
git config user.email actions-bot@users.noreply.github.com
- name: Tag new target
run: git tag -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.target }}
- name: Push new tag
run: git push origin ${{ github.event.inputs.main_version }} --force
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The default behaviour of the action with no configured inputs is to check the cu
Pull requests from forks are rebaseable only if they [allow edits from maintainers](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).

```yml
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
```
### Periodically rebase all pull requests
Expand All @@ -26,7 +26,7 @@ jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
```
### Rebase all pull requests on push to the base branch
Expand All @@ -40,15 +40,15 @@ jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
with:
base: main
```
### Exclude pull requests with specific labels
```yml
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
with:
exclude-labels: |
no-rebase
Expand All @@ -58,7 +58,7 @@ jobs:
### Exclude pull request forks with head filter
```yml
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
with:
head: 'my-org:*'
```
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
id: rebase
with:
head: ${{ github.event.client_payload.pull_request.head.label }}
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
repo: ['my-org/repo1', 'my-org/repo2', 'my-org/repo3']
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ matrix.repo }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ inputs:
description: 'Exclude draft pull requests'
default: false
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
branding:
icon: 'git-pull-request'
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rebase",
"version": "2.0.0",
"version": "3.0.0",
"private": true,
"description": "Rebase pull requests in a repository",
"main": "lib/main.js",
Expand Down

0 comments on commit 52289dd

Please sign in to comment.