Skip to content

Commit ba8f492

Browse files
committed
ci: let the shared fork SonarCloud workflow resolve the pull request itself
- The build no longer uploads a PR metadata artifact. - The fork SonarCloud workflow grants pull-requests: read instead of actions: read.
1 parent dd2a75f commit ba8f492

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

‎.github/workflows/ci-build.yml‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,3 @@ jobs:
1919
minverMinimumMajorMinor: '10.2'
2020
secrets:
2121
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
22-
23-
# PR metadata consumed by the fork-PR SonarCloud flow (see sonarcloud-fork.yml).
24-
save-pr-metadata:
25-
if: github.event_name == 'pull_request'
26-
runs-on: ubuntu-latest
27-
permissions:
28-
contents: read
29-
steps:
30-
- name: Write PR metadata
31-
env:
32-
PR_NUMBER: ${{ github.event.pull_request.number }}
33-
PR_BASE: ${{ github.event.pull_request.base.ref }}
34-
run: |
35-
mkdir -p pr-meta
36-
printf '%s' "$PR_NUMBER" > pr-meta/number
37-
printf '%s' "$PR_BASE" > pr-meta/base
38-
- name: Upload PR metadata
39-
uses: actions/upload-artifact@v7
40-
with:
41-
name: pr-number
42-
path: pr-meta/
43-
retention-days: 1

‎.github/workflows/sonarcloud-fork.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
permissions:
1212
contents: read
13-
actions: read
13+
pull-requests: read
1414

1515
jobs:
1616
sonarcloud-fork:

0 commit comments

Comments
 (0)
⌂ 换网址