From c6ca5cf17edc2c642a9b849c5ec121abc5814c4c Mon Sep 17 00:00:00 2001 From: Lakshya Khatri Date: Sun, 31 Jul 2022 14:37:09 +0530 Subject: [PATCH 1/5] Fix: provide keys to actions to make CDSAPI calls --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2fc65e7..11b1bb4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -42,6 +42,9 @@ jobs: ${{ runner.os }}-test- ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 + - name: configure credentials 🔒 + shell: bash + run: echo "${{ secrets.CDSAPI_KEY }}" > ~/.cdsapirc - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 From 77f7d8c20f19ffa61ce07d0f0d823419404dfae0 Mon Sep 17 00:00:00 2001 From: Lakshya Khatri Date: Sun, 31 Jul 2022 14:47:02 +0530 Subject: [PATCH 2/5] Chore: trying by removing additional quotes --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 11b1bb4..cea8d49 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,7 +44,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: configure credentials 🔒 shell: bash - run: echo "${{ secrets.CDSAPI_KEY }}" > ~/.cdsapirc + run: echo ${{ secrets.CDSAPI_KEY }} > ~/.cdsapirc - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 From e289fb0f4302488c85167e4fe875e4ff852d0221 Mon Sep 17 00:00:00 2001 From: Lakshya Khatri Date: Sun, 31 Jul 2022 14:52:54 +0530 Subject: [PATCH 3/5] Chore: add keys separately to prevent whitespace errors --- .github/workflows/CI.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cea8d49..d2a0639 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -42,9 +42,11 @@ jobs: ${{ runner.os }}-test- ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - - name: configure credentials 🔒 + - name: Configure Credentials 🔒 shell: bash - run: echo ${{ secrets.CDSAPI_KEY }} > ~/.cdsapirc + run: | + echo ${{ secrets.CDSAPI_URL }} > ~/.cdsapirc + echo ${{ secrets.CDSAPI_KEY }} >> ~/.cdsapirc - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 From 2e8c8b9b4fc1179182996b887d1e3af44e9c7436 Mon Sep 17 00:00:00 2001 From: Lakshya Khatri Date: Sun, 31 Jul 2022 18:05:32 +0530 Subject: [PATCH 4/5] Chore: use secrets via environment --- .github/workflows/CI.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d2a0639..d5c2ee3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -42,11 +42,14 @@ jobs: ${{ runner.os }}-test- ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - - name: Configure Credentials 🔒 + - name: Configure API Keys 🔒 shell: bash + env: + CDSAPI_URL: ${{ secrets.CDSAPI_URL }} + CDSAPI_KEY: ${{ secrets.CDSAPI_KEY }} run: | - echo ${{ secrets.CDSAPI_URL }} > ~/.cdsapirc - echo ${{ secrets.CDSAPI_KEY }} >> ~/.cdsapirc + echo "$CDSAPI_URL" > ~/.cdsapirc + echo "$CDSAPI_KEY" >> ~/.cdsapirc - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 From d39e2dd469424ef6001610153ee7034a603a4cbf Mon Sep 17 00:00:00 2001 From: Lakshya Khatri Date: Sun, 31 Jul 2022 19:00:38 +0530 Subject: [PATCH 5/5] Chore: revert environment variable usage as secrets are not picking up --- .github/workflows/CI.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d5c2ee3..abddd28 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,12 +44,9 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: Configure API Keys 🔒 shell: bash - env: - CDSAPI_URL: ${{ secrets.CDSAPI_URL }} - CDSAPI_KEY: ${{ secrets.CDSAPI_KEY }} run: | - echo "$CDSAPI_URL" > ~/.cdsapirc - echo "$CDSAPI_KEY" >> ~/.cdsapirc + echo ${{ secrets.CDSAPI_URL }} > ~/.cdsapirc + echo ${{ secrets.CDSAPI_KEY }} >> ~/.cdsapirc - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1