Skip to content

Commit

Permalink
Merge pull request #7477 from JayaShakthi97/workflow-fix
Browse files Browse the repository at this point in the history
Fix changeset checker
  • Loading branch information
JayaShakthi97 authored Jan 31, 2025
2 parents 4aab7b9 + 3f67fb6 commit 0896bc4
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/check-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,30 @@ jobs:
github.event.workflow_run.conclusion == 'success'
steps:
- name: 📥 Download PR Number Artifact
uses: actions/download-artifact@v4
uses: actions/[email protected]
with:
name: pr-number
path: ./
github-token: ${{ env.GH_TOKEN }}
script: |
const artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }},
});
const matchArtifact = artifacts.data.artifacts.find(artifact => artifact.name === "pr-number");
if (!matchArtifact) {
throw new Error("Artifact 'pr-number' not found.");
}
const download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
const fs = require('fs');
fs.writeFileSync('${{ github.workspace }}/pr-number.zip', Buffer.from(download.data));
- name: 📦 Extract PR Number Artifact
run: unzip pr-number.zip
Expand Down

0 comments on commit 0896bc4

Please sign in to comment.