Skip to content

Commit

Permalink
Fix: updated github script usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 authored Sep 16, 2024
1 parent 03cec31 commit 62fa485
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions preview-deployments/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ runs:
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand All @@ -43,18 +43,18 @@ runs:
shell: bash

- name: Download built site artifact 📦
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr_site"
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand Down

0 comments on commit 62fa485

Please sign in to comment.