mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
CI: Fix up JS syntax in GnuComment
This commit is contained in:
parent
4f5407d22b
commit
0f1638545c
1 changed files with 10 additions and 10 deletions
20
.github/workflows/GnuComment.yml
vendored
20
.github/workflows/GnuComment.yml
vendored
|
@ -16,25 +16,25 @@ jobs:
|
||||||
uses: actions/github-script@v3.1.0
|
uses: actions/github-script@v3.1.0
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
# List all artifacts from GnuTests
|
// List all artifacts from GnuTests
|
||||||
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
run_id: ${{github.event.workflow_run.id }},
|
run_id: ${{ github.event.workflow_run.id }},
|
||||||
});
|
});
|
||||||
|
|
||||||
# Download the "comment" artifact, which contains a PR number (NR) and result.txt
|
// Download the "comment" artifact, which contains a PR number (NR) and result.txt
|
||||||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
return artifact.name == "comment"
|
return artifact.name == "comment"
|
||||||
})[0];
|
})[0];
|
||||||
var download = await github.actions.downloadArtifact({
|
var download = await github.actions.downloadArtifact({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
artifact_id: matchArtifact.id,
|
artifact_id: matchArtifact.id,
|
||||||
archive_format: 'zip',
|
archive_format: 'zip',
|
||||||
});
|
});
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
fs.writeFileSync('${{github.workspace}}/comment.zip', Buffer.from(download.data));
|
fs.writeFileSync('${{ github.workspace }}/comment.zip', Buffer.from(download.data));
|
||||||
- run: unzip comment.zip
|
- run: unzip comment.zip
|
||||||
|
|
||||||
- name: 'Comment on PR'
|
- name: 'Comment on PR'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue