Update runtime to node 16

This commit is contained in:
Peter Evans
2022-03-22 12:54:49 +09:00
parent 88ec35d633
commit 8d9724ed37
7 changed files with 41 additions and 33 deletions

8
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"

View File

@@ -14,20 +14,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 16.x
- run: npm ci
- run: npm run build
- run: npm run format-check
- run: npm run lint
- run: npm run test
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: action.yml
path: action.yml
@@ -40,14 +40,14 @@ jobs:
matrix:
target: [built, committed]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: action.yml
path: .
@@ -70,8 +70,8 @@ jobs:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: dist
path: dist

View File

@@ -11,7 +11,7 @@ jobs:
PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }}
run: echo "$PAYLOAD_CONTEXT"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
if: github.event.client_payload.ref != ''
with:
ref: ${{ github.event.client_payload.ref }}

View File

@@ -8,7 +8,7 @@ A GitHub action to create a repository dispatch event.
```yml
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: my-event
@@ -55,7 +55,7 @@ jobs:
myEvent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.ref }}
- run: echo ${{ github.event.client_payload.sha }}
@@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: ${{ matrix.repo }}

View File

@@ -14,7 +14,7 @@ inputs:
description: 'JSON payload with extra information about the webhook event that your action or worklow may use.'
default: '{}'
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'
branding:
icon: 'target'

34
package-lock.json generated
View File

@@ -1,31 +1,31 @@
{
"name": "repository-dispatch",
"version": "1.0.0",
"version": "2.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "repository-dispatch",
"version": "1.0.0",
"version": "2.0.0",
"license": "MIT",
"dependencies": {
"@actions/core": "1.6.0",
"@actions/github": "5.0.0"
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.0"
},
"devDependencies": {
"@types/jest": "27.0.3",
"@types/node": "16.11.11",
"@typescript-eslint/parser": "5.5.0",
"@vercel/ncc": "0.32.0",
"eslint": "8.3.0",
"eslint-plugin-github": "4.3.5",
"eslint-plugin-jest": "25.3.0",
"jest": "27.4.3",
"jest-circus": "27.4.2",
"js-yaml": "4.1.0",
"prettier": "2.5.0",
"ts-jest": "27.0.7",
"typescript": "4.5.2"
"@types/jest": "^27.0.3",
"@types/node": "^16.11.11",
"@typescript-eslint/parser": "^5.5.0",
"@vercel/ncc": "^0.32.0",
"eslint": "^8.3.0",
"eslint-plugin-github": "^4.3.5",
"eslint-plugin-jest": "^25.3.0",
"jest": "^27.4.3",
"jest-circus": "^27.4.2",
"js-yaml": "^4.1.0",
"prettier": "^2.5.0",
"ts-jest": "^27.0.7",
"typescript": "^4.5.2"
}
},
"node_modules/@actions/core": {

View File

@@ -1,6 +1,6 @@
{
"name": "repository-dispatch",
"version": "1.0.0",
"version": "2.0.0",
"private": true,
"description": "Create a repository dispatch event",
"main": "lib/main.js",