Skip to content

Commit

Permalink
Merge pull request #105 from peter-evans/v2
Browse files Browse the repository at this point in the history
Update runtime to node 16
  • Loading branch information
peter-evans committed Mar 22, 2022
2 parents 63e171a + 862a968 commit c9fcb64
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 30 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand All @@ -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: .
Expand Down Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -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'
Expand Down
16 changes: 8 additions & 8 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
@@ -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": {
Expand Down

0 comments on commit c9fcb64

Please sign in to comment.