Bump actions/github-script from 3.1.0 to 6.0.0 (#314)
* Bump actions/github-script from 3.1.0 to 6 Bumps [actions/github-script](https://github.com/actions/github-script) from 3.1.0 to 6. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v3.1.0...v6) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update build-pull-request.yml * Update deploy-pull-request.yml * reference rest method by github.rest this broke in v5 see https://github.com/actions/github-script#breaking-changes-in-v5 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com> Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
This commit is contained in:
parent
a8ba38ef1e
commit
2eee3736df
2 changed files with 7 additions and 7 deletions
2
.github/workflows/build-pull-request.yml
vendored
2
.github/workflows/build-pull-request.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
name: previewbuild
|
name: previewbuild
|
||||||
path: dist
|
path: dist
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
- uses: actions/github-script@v5.1.0
|
- uses: actions/github-script@v6.0.0
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
|
12
.github/workflows/deploy-pull-request.yml
vendored
12
.github/workflows/deploy-pull-request.yml
vendored
|
@ -14,10 +14,10 @@ jobs:
|
||||||
# workflow_run action (https://github.com/actions/download-artifact/issues/60)
|
# workflow_run action (https://github.com/actions/download-artifact/issues/60)
|
||||||
# so instead we get this mess:
|
# so instead we get this mess:
|
||||||
- name: 'Download artifact'
|
- name: 'Download artifact'
|
||||||
uses: actions/github-script@v3.1.0
|
uses: actions/github-script@v6.0.0
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
var 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 }},
|
||||||
|
@ -25,7 +25,7 @@ jobs:
|
||||||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
return artifact.name == "previewbuild"
|
return artifact.name == "previewbuild"
|
||||||
})[0];
|
})[0];
|
||||||
var download = await github.actions.downloadArtifact({
|
var 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,
|
||||||
|
@ -36,7 +36,7 @@ jobs:
|
||||||
var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => {
|
var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
return artifact.name == "pr.json"
|
return artifact.name == "pr.json"
|
||||||
})[0];
|
})[0];
|
||||||
var download = await github.actions.downloadArtifact({
|
var download = await github.rest.actions.downloadArtifact({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
artifact_id: prInfoArtifact.id,
|
artifact_id: prInfoArtifact.id,
|
||||||
|
@ -48,7 +48,7 @@ jobs:
|
||||||
run: unzip -d dist previewbuild.zip && rm previewbuild.zip && unzip pr.json.zip && rm pr.json.zip
|
run: unzip -d dist previewbuild.zip && rm previewbuild.zip && unzip pr.json.zip && rm pr.json.zip
|
||||||
- name: 'Read PR Info'
|
- name: 'Read PR Info'
|
||||||
id: readctx
|
id: readctx
|
||||||
uses: actions/github-script@v3.1.0
|
uses: actions/github-script@v6.0.0
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
@ -75,4 +75,4 @@ jobs:
|
||||||
pull-request-number: ${{ steps.readctx.outputs.prnumber }}
|
pull-request-number: ${{ steps.readctx.outputs.prnumber }}
|
||||||
description-message: |
|
description-message: |
|
||||||
Preview: ${{ steps.netlify.outputs.deploy-url }}
|
Preview: ${{ steps.netlify.outputs.deploy-url }}
|
||||||
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.
|
⚠️ Exercise caution. Use test accounts. ⚠️
|
||||||
|
|
Loading…
Reference in a new issue