Skip to content

Commit

Permalink
fix artifacts url
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfbrito committed Aug 21, 2024
1 parent ef57140 commit fe836a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const runId = context.runId;
const owner = context.repo.owner;
const repo = context.repo.repo;
const runId = context.runId;
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner,
Expand All @@ -109,7 +109,7 @@ jobs:
const artifact = artifacts.data.artifacts.find(a => a.name === '${{ runner.os }} Artifacts');
if (artifact) {
const url = `https://github.com/${{ github.repository }}/suites/${{ github.run_id }}/artifacts/${artifact.id}`;
const url = `https://github.com/${owner}/${repo}/actions/runs/${runId}/artifacts/${artifact.id}`;
core.setOutput('artifact_url', url);
} else {
core.setFailed(`Artifact not found for ${artifact.name}`);
Expand Down

0 comments on commit fe836a7

Please sign in to comment.