Skip to content

Commit 28e8ca8

Browse files
committed
Coverity CI: do not check coverity_token in every step
This reverts 960d231 (2022-02-21) because the commit 18f0496 (2022-04-20) already restricts the scheduled run to CESNET Git repository or manual push. So that the token unavailability should be considered error and thus the condition doesn't need to be re-iterated in every step.
1 parent a390601 commit 28e8ca8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/coverity-scan.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ jobs:
1616
coverity_token: ${{ secrets.coverity_token }}
1717

1818
steps:
19+
- name: Check Coverity token presence
20+
if: env.coverity_token == ''
21+
run: |
22+
echo "secrects.coverity_token not present, skipping the analysys!"
23+
exit 1
24+
1925
- name: Get Coverity tool name # the file name contains version and is used as the cache key
20-
if: ${{ env.coverity_token }}
2126
id: tool
2227
run: |
2328
FILENAME=$(curl -LIf "https://scan.coverity.com/download/linux64\
2429
?token=$coverity_token&project=UltraGrid" |
2530
sed -n '/content-disposition/s/.*\"\(.*\)\"/\1/p')
2631
echo "filename=$FILENAME" >> $GITHUB_OUTPUT
2732
- name: Run actions/cache for Coverity build tool
28-
if: ${{ env.coverity_token }}
2933
id: cache-coverity-tool
3034
uses: actions/cache@main
3135
with:
@@ -36,13 +40,11 @@ jobs:
3640
run: |
3741
wget --no-verbose https://scan.coverity.com/download/linux64 --post-data "token=$coverity_token&project=UltraGrid" -O ~/coverity_tool.tgz
3842
- name: Extract Coverity build tool
39-
if: ${{ env.coverity_token }}
4043
run: |
4144
tar xaf ~/coverity_tool.tgz
4245
mv cov-analysis* /tmp/cov-analysis
4346
4447
- uses: actions/checkout@v4
45-
if: ${{ env.coverity_token }}
4648

4749
- name: Fetch SDKs ETags
4850
id: etags
@@ -81,14 +83,11 @@ jobs:
8183
.github/scripts/Linux/prepare.sh
8284
8385
- name: configure
84-
if: ${{ env.coverity_token }}
8586
run: ./autogen.sh $FEATURES
8687
- name: Build with cov-build
87-
if: ${{ env.coverity_token }}
8888
run: |
8989
/tmp/cov-analysis/bin/cov-build --dir cov-int make -j2
9090
- name: Submit the result to Coverity Scan
91-
if: ${{ env.coverity_token }}
9291
run: |
9392
tar caf ultragrid.tar.xz cov-int
9493
result=$(curl -Sf --form token=$coverity_token \

0 commit comments

Comments
 (0)