Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #35526

Merged
merged 8 commits into from
Dec 2, 2024
Prev Previous commit
Next Next commit
Update events-that-trigger-workflows.md (#53230)
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
commit 385c21468a337ab8513a3b4662cbb103d43f3b88
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
Loading