Skip to content

Commit

Permalink
Update events-that-trigger-workflows.md (#53230)
Browse files Browse the repository at this point in the history
Co-authored-by: Sunbrye Ly <56200261+sunbrye@users.noreply.github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Vanessa <vgrl@github.com>
  • Loading branch information
4 people authored Dec 2, 2024
1 parent 92f31c9 commit 385c214
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1353,19 +1353,26 @@ jobs:
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));
const fs = require('fs');
const path = require('path');
const temp = '{% raw %}${{ runner.temp }}{% endraw %}/artifacts';
if (!fs.existsSync(temp)){
fs.mkdirSync(temp);
}
fs.writeFileSync(path.join(temp, 'pr_number.zip'), Buffer.from(download.data));
- name: 'Unzip artifact'
run: unzip pr_number.zip
run: unzip pr_number.zip -d "{% raw %}${{ runner.temp }}{% endraw %}/artifacts"
- name: 'Comment on PR'
uses: {% data reusables.actions.action-github-script %}
with:
github-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
script: |
let fs = require('fs');
let issue_number = Number(fs.readFileSync('./pr_number'));
const fs = require('fs');
const path = require('path');
const temp = '{% raw %}${{ runner.temp }}{% endraw %}/artifacts';
const issue_number = Number(fs.readFileSync(path.join(temp, 'pr_number')));
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit 385c214

Please sign in to comment.