Skip to content

Commit

Permalink
Potential fix 2 for failed code quality check comment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
regisss committed Aug 30, 2024
1 parent 33d281f commit bd9f6bc
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/failed_code_quality_check_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,10 @@ jobs:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
name: Post comment to run make style
steps:
- name: Download artifact
uses: actions/github-script@v3.1.0
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr-number"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{steps.setup-env.outputs.current_work_dir}}/pr-number.zip', Buffer.from(download.data));
- run: unzip pr-number.zip
- name: Display structure of downloaded files
run: ls -l
name: pr-number
- name: Get PR number
id: github-context
run: |
Expand Down

0 comments on commit bd9f6bc

Please sign in to comment.