Bump github-script

This commit is contained in:
Piotr Rogowski 2023-09-24 10:36:37 +02:00
parent 6928900fde
commit fceb968112
No known key found for this signature in database
GPG Key ID: 4A842D702D9C6F8F
1 changed files with 5 additions and 5 deletions

View File

@ -18,10 +18,10 @@ jobs:
steps: steps:
- name: Download artifact - name: Download artifact
uses: actions/github-script@v3.1.0 uses: actions/github-script@v6
with: with:
script: | script: |
const artifacts = await github.actions.listWorkflowRunArtifacts({ const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }}, run_id: ${{github.event.workflow_run.id }},
@ -29,7 +29,7 @@ jobs:
const matchArtifact = artifacts.data.artifacts.filter((artifact) => { const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "build" return artifact.name == "build"
})[0]; })[0];
const download = await github.actions.downloadArtifact({ const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
artifact_id: matchArtifact.id, artifact_id: matchArtifact.id,
@ -49,14 +49,14 @@ jobs:
gitHubToken: ${{ secrets.GITHUB_TOKEN }} # GitHub Deployments gitHubToken: ${{ secrets.GITHUB_TOKEN }} # GitHub Deployments
wranglerVersion: "3" wranglerVersion: "3"
- name: "Comment on PR" - name: "Comment on PR"
uses: actions/github-script@v3 uses: actions/github-script@v6
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
script: | script: |
const fs = require('fs'); const fs = require('fs');
try { try {
const issue_number = Number(fs.readFileSync('./build/PR_NR')); const issue_number = Number(fs.readFileSync('./build/PR_NR'));
await github.issues.createComment({ await github.rest.issues.createComment({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: issue_number, issue_number: issue_number,