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:
issue-number: ${{ steps.vars.outputs.issue-number }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
node-version: 16.x
- run: npm ci
- run: npm run test
- run: npm run package
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: action.yml
path: action.yml
@ -47,14 +47,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: .
@ -91,8 +91,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

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

View File

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

16
package-lock.json generated
View File

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

View File

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