Skip to content

Commit

Permalink
product_uri-check
Browse files Browse the repository at this point in the history
  • Loading branch information
petermm committed Feb 5, 2024
1 parent db09349 commit 1a460af
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/codechecker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,27 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF
- name: Check for CodeChecker Web CODECHECKER_STORE_PRODUCT_URI availability
id: product_uri-check
# perform product_uri-check & put boolean result as an output
# needed as GH doesn't yet allow checking for empty secrets in conditionals
shell: bash
run: |
if [ "${{ secrets.CODECHECKER_STORE_PRODUCT_URI }}" != '' ]; then
echo "product_uri_available=true" >> $GITHUB_OUTPUT;
else
echo "product_uri_available=false" >> $GITHUB_OUTPUT;
fi
- uses: whisperity/codechecker-analysis-action@v1
id: codechecker
with:
ctu: true
build-command: "cd ${{ github.workspace }}/build; make"
store: ${{ github.event_name == 'push' && secrets.CODECHECKER_STORE_PRODUCT_URI }}
store: ${{ github.event_name == 'push' && steps.product_uri-check.outputs.product_uri_available == 'true' }}
store-url: ${{ secrets.CODECHECKER_STORE_PRODUCT_URI }}
store-username: ${{ secrets.CODECHECKER_STORE_USER }}
store-password: ${{ secrets.CODECHECKER_STORE_PASSWORD }}
diff: ${{ github.event_name == 'pull_request' && secrets.CODECHECKER_STORE_PRODUCT_URI }}
diff: ${{ github.event_name == 'pull_request' && steps.product_uri-check.outputs.product_uri_available == 'true' }}
diff-url: ${{ secrets.CODECHECKER_STORE_PRODUCT_URI }}
diff-username: ${{ secrets.CODECHECKER_STORE_USER }}
diff-password: ${{ secrets.CODECHECKER_STORE_PASSWORD }}
Expand Down

0 comments on commit 1a460af

Please sign in to comment.