Merge pull request #105 from peter-evans/v2

Update runtime to node 16
This commit is contained in:
Peter Evans 2022-03-22 14:59:27 +09:00 committed by GitHub
commit c9fcb64660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 30 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

@ -16,18 +16,18 @@ jobs:
outputs: outputs:
issue-number: ${{ steps.vars.outputs.issue-number }} issue-number: ${{ steps.vars.outputs.issue-number }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v1 - uses: actions/setup-node@v3
with: with:
node-version: 12.x node-version: 16.x
- run: npm ci - run: npm ci
- run: npm run test - run: npm run test
- run: npm run package - run: npm run package
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: dist name: dist
path: dist path: dist
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: action.yml name: action.yml
path: action.yml path: action.yml
@ -47,14 +47,14 @@ jobs:
matrix: matrix:
target: [built, committed] target: [built, committed]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- if: matrix.target == 'built' || github.event_name == 'pull_request' - if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: dist name: dist
path: dist path: dist
- if: matrix.target == 'built' || github.event_name == 'pull_request' - if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: action.yml name: action.yml
path: . path: .
@ -91,8 +91,8 @@ jobs:
needs: [test] needs: [test]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v3
with: with:
name: dist name: dist
path: dist path: dist

View File

@ -12,7 +12,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
```yml ```yml
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
issue-number: 1 issue-number: 1
body: | body: |
@ -28,7 +28,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
```yml ```yml
- name: Update comment - name: Update comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: 557858210 comment-id: 557858210
body: | body: |
@ -40,7 +40,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
```yml ```yml
- name: Add reactions - name: Add reactions
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: 557858210 comment-id: 557858210
reactions: heart, hooray, laugh reactions: heart, hooray, laugh
@ -69,7 +69,7 @@ Note that in order to read the step output the action step must have an id.
```yml ```yml
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
id: couc id: couc
with: with:
issue-number: 1 issue-number: 1
@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Add reaction - name: Add reaction
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: ${{ github.event.comment.id }} comment-id: ${{ github.event.comment.id }}
reactions: eyes reactions: eyes
@ -117,7 +117,7 @@ If it returns a value, the comment already exists and the content is replaced.
body-includes: Build output body-includes: Build output
- name: Create or update comment - name: Create or update comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: ${{ steps.fc.outputs.comment-id }} comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
@ -139,7 +139,7 @@ If required, the create and update steps can be separated for greater control.
- name: Create comment - name: Create comment
if: steps.fc.outputs.comment-id == '' if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
body: | body: |
@ -148,7 +148,7 @@ If required, the create and update steps can be separated for greater control.
- name: Update comment - name: Update comment
if: steps.fc.outputs.comment-id != '' if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: ${{ steps.fc.outputs.comment-id }} comment-id: ${{ steps.fc.outputs.comment-id }}
body: | body: |
@ -171,7 +171,7 @@ The content must be [escaped to preserve newlines](https://github.community/t/se
echo "::set-output name=body::$body" echo "::set-output name=body::$body"
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
issue-number: 1 issue-number: 1
body: ${{ steps.get-comment-body.outputs.body }} body: ${{ steps.get-comment-body.outputs.body }}
@ -197,7 +197,7 @@ The template is rendered using the [render-template](https://github.com/chuhlomi
bar: that bar: that
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v2
with: with:
issue-number: 1 issue-number: 1
body: ${{ steps.template.outputs.result }} body: ${{ steps.template.outputs.result }}

View File

@ -22,7 +22,7 @@ outputs:
comment-id: comment-id:
description: 'The id of the created comment' description: 'The id of the created comment'
runs: runs:
using: 'node12' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'
branding: branding:
icon: 'message-square' icon: 'message-square'

16
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "create-or-update-comment", "name": "create-or-update-comment",
"version": "1.0.0", "version": "2.0.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "create-or-update-comment", "name": "create-or-update-comment",
"version": "1.0.0", "version": "2.0.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.6.0", "@actions/core": "^1.6.0",
@ -3695,9 +3695,9 @@
} }
}, },
"node_modules/minimist": { "node_modules/minimist": {
"version": "1.2.5", "version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true "dev": true
}, },
"node_modules/ms": { "node_modules/ms": {
@ -7637,9 +7637,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.5", "version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true "dev": true
}, },
"ms": { "ms": {

View File

@ -1,6 +1,6 @@
{ {
"name": "create-or-update-comment", "name": "create-or-update-comment",
"version": "1.0.0", "version": "2.0.0",
"description": "Create or update an issue or pull request comment", "description": "Create or update an issue or pull request comment",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {