We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bce2a31 commit 97fca1cCopy full SHA for 97fca1c
1 file changed
.github/workflows/template-pr-ci.yml
@@ -14,6 +14,20 @@ jobs:
14
python-version: ["3.12"]
15
steps:
16
- uses: actions/checkout@v4
17
+ - name: Conditionally set up .cdsapirc
18
+ shell: bash
19
+ run: |
20
+ if [ -n "${{ secrets.CDSAPI_KEY }}" ]; then
21
+ if [[ "$RUNNER_OS" == "Windows" ]]; then
22
+ cdsapirc_path="$USERPROFILE/.cdsapirc"
23
+ else
24
+ cdsapirc_path="$HOME/.cdsapirc"
25
+ fi
26
+ echo "url = https://cds.climate.copernicus.eu/api" >> "$cdsapirc_path"
27
+ echo "key = ${{ secrets.CDSAPI_KEY }}" >> "$cdsapirc_path"
28
29
+ echo "CDSAPI_KEY secret is empty or not set. Skipping .cdsapirc setup."
30
31
- name: setup-pixi
32
uses: prefix-dev/setup-pixi@v0.8.3
33
- name: Run tests
0 commit comments