From 8d9724ed378b382022bf4424582e49e9c13756f8 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Tue, 22 Mar 2022 12:54:49 +0900 Subject: [PATCH 1/2] Update runtime to node 16 --- .github/dependabot.yml | 8 +++++ .github/workflows/ci.yml | 20 ++++++------ .github/workflows/on-repository-dispatch.yml | 2 +- README.md | 6 ++-- action.yml | 2 +- package-lock.json | 34 ++++++++++---------- package.json | 2 +- 7 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b85dc18 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04e4184..31acf8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/on-repository-dispatch.yml b/.github/workflows/on-repository-dispatch.yml index 34fcd43..5ee6a3e 100644 --- a/.github/workflows/on-repository-dispatch.yml +++ b/.github/workflows/on-repository-dispatch.yml @@ -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 }} diff --git a/README.md b/README.md index 451fb64..6a8e33b 100644 --- a/README.md +++ b/README.md @@ -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 }} diff --git a/action.yml b/action.yml index 9b8992f..95ab44e 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/package-lock.json b/package-lock.json index e04cc72..0c1dc18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index 395b974..83c7c5c 100644 --- a/package.json +++ b/package.json @@ -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", From 646aa8008ab99f8a297c6dd0af621886d9aa7b5b Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Tue, 22 Mar 2022 12:57:19 +0900 Subject: [PATCH 2/2] Fix upload-artifact action version --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31acf8c..e9753ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,11 @@ jobs: - run: npm run format-check - run: npm run lint - run: npm run test - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: dist path: dist - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: action.yml path: action.yml