Skip to content

Commit aa9f244

Browse files
committed
ci(tics): test 34429-pull_request_target version
1 parent b5627e5 commit aa9f244

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/tics.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: [main]
77
# Running on pull_request_target instead of pull_request because this workflow
88
# uses secrets, and thus we need to ensure it runs under this project's code base.
9-
pull_request:
9+
pull_request_target:
1010
branches: [main]
1111
schedule:
1212
- cron: '0 10 * * *'
@@ -55,17 +55,18 @@ jobs:
5555

5656
- name: Check changed paths in PR
5757
id: changed-paths
58-
if: github.event_name == 'pull_request'
58+
if: github.event_name == 'pull_request_target'
5959
uses: dorny/paths-filter@v3
6060
with:
6161
filters: |
6262
any:
6363
- "**/*"
6464
list-files: csv
6565

66-
- id: get-pr-filelist
66+
- id: get-filelist
67+
name: List of files to analyze
6768
run: |
68-
if [[ "${{ github.event_name }}" == "pull_request" ]]
69+
if [[ "${{ github.event_name }}" == "pull_request_target" ]]
6970
then
7071
echo "${{ steps.changed-paths.outputs.any_files }}" | tr "," "\n" > ${TICS_FILELIST}
7172
else
@@ -86,6 +87,8 @@ jobs:
8687
env:
8788
CGO_ENABLED: "0"
8889

90+
# Get the coverage file produced by the unit tests workflow and get it
91+
# ready for TiCS.
8992
- name: Prepare cobertura XML results
9093
env:
9194
TICS_COVERAGE_FOLDER: ".coverage"
@@ -100,8 +103,8 @@ jobs:
100103
- run: go install honnef.co/go/tools/cmd/staticcheck@latest
101104

102105
- name: Run TiCS client analysis
103-
uses: tiobe/tics-github-action@v3
104-
if: github.event_name == 'pull_request'
106+
uses: tiobe/tics-github-action@v34429-pull_request_target
107+
if: github.event_name == 'pull_request_target'
105108
with:
106109
mode: 'client'
107110
codetype: 'TESTCODE'
@@ -112,8 +115,8 @@ jobs:
112115
installTics: true
113116

114117
- name: Run TiCS server analysis
115-
uses: tiobe/tics-github-action@v3
116-
if: github.event_name != 'pull_request'
118+
uses: tiobe/tics-github-action@34429-pull_request_target
119+
if: github.event_name != 'pull_request_target'
117120
with:
118121
mode: 'qserver'
119122
codetype: 'PRODUCTION'

0 commit comments

Comments
 (0)