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