Skip to content

Commit 6612558

Browse files
committed
avoid empty string env in CI
Avoid empty string for PCS_API_KEY and PCCS_URL when CI is running from fork.
1 parent d2eb2ab commit 6612558

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,20 @@ jobs:
2626
runs-on: ubuntu-24.04
2727

2828
env:
29-
# PCS_API_KEY: Raoul Strackx' personal access key. Only used here, and only provides access to the Intel PCS service, which is public anyway
30-
PCS_API_KEY: ${{ secrets.PCS_API_KEY }}
31-
PCCS_URL: ${{ vars.PCCS_URL }}
3229
CMAKE_POLICY_VERSION_MINIMUM: 3.5
3330

3431
steps:
3532
- uses: actions/checkout@v4
3633

34+
- name: Conditionally export PCS_API_KEY and PCCS_URL
35+
run: |
36+
if [ -n "${{ secrets.PCS_API_KEY }}" ]; then
37+
echo "PCS_API_KEY=${{ secrets.PCS_API_KEY }}" >> $GITHUB_ENV
38+
fi
39+
if [ -n "${{ vars.PCCS_URL }}" ]; then
40+
echo "PCCS_URL=${{ vars.PCCS_URL }}" >> $GITHUB_ENV
41+
fi
42+
3743
- name: Install additional dependencies
3844
run: |
3945
# install gpg

0 commit comments

Comments
 (0)