Skip to content

Commit

Permalink
Update Sonar action for pull requests
Browse files Browse the repository at this point in the history
Fix problem with absolete action github-script.
  • Loading branch information
fmarco76 committed Feb 22, 2024
1 parent 9890872 commit d8df8da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/sonarcloud-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
pr-base: ${{ steps.pr-base-script.outputs.result }}
steps:
- name: 'Download PR artifact'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
id: download-pr
with:
result-encoding: string
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
Expand All @@ -36,7 +36,7 @@ jobs:
core.setFailed("No PR artifact");
return "False";
}
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Retrieve the pr number
if: success()
id: pr-artifact-script
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
result-encoding: string
script: |
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Retrieve the pr base
if: success()
id: pr-base-script
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
result-encoding: string
script: |
Expand Down

0 comments on commit d8df8da

Please sign in to comment.