From 06644a4eee5b54db45720ef4c4440395903e678b Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 9 Oct 2024 17:21:41 -0400 Subject: [PATCH 1/3] unpin crds workflow --- .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 932ae63efe..82714470b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: envs: | - linux: check-dependencies latest_crds_contexts: - uses: spacetelescope/crds/.github/workflows/contexts.yml@94138b4501c9487535fd6b977492fc1a2c319708 # 12.0.2 + uses: spacetelescope/crds/.github/workflows/contexts.yml crds_context: needs: [ latest_crds_contexts ] runs-on: ubuntu-latest From 16884070d82c738ba9cf8b1ff643f33ade7dc523 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 9 Oct 2024 17:59:26 -0400 Subject: [PATCH 2/3] unpin other uses --- .github/workflows/ci_cron.yml | 2 +- .github/workflows/tests_devdeps.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index d116e6e938..df246a580d 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -23,7 +23,7 @@ concurrency: jobs: latest_crds_contexts: - uses: spacetelescope/crds/.github/workflows/contexts.yml@94138b4501c9487535fd6b977492fc1a2c319708 # 12.0.2 + uses: spacetelescope/crds/.github/workflows/contexts.yml crds_context: needs: [ latest_crds_contexts ] runs-on: ubuntu-latest diff --git a/.github/workflows/tests_devdeps.yml b/.github/workflows/tests_devdeps.yml index 6beefbdaa6..35beb87ac0 100644 --- a/.github/workflows/tests_devdeps.yml +++ b/.github/workflows/tests_devdeps.yml @@ -32,7 +32,7 @@ concurrency: jobs: latest_crds_contexts: - uses: spacetelescope/crds/.github/workflows/contexts.yml@94138b4501c9487535fd6b977492fc1a2c319708 # 12.0.2 + uses: spacetelescope/crds/.github/workflows/contexts.yml crds_context: needs: [ latest_crds_contexts ] runs-on: ubuntu-latest From f6048da26b2e21943d137cd52bc23362e1504ad3 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 9 Oct 2024 18:03:22 -0400 Subject: [PATCH 3/3] move crds context workflow here --- .github/workflows/ci.yml | 2 +- .github/workflows/ci_cron.yml | 2 +- .github/workflows/contexts.yml | 26 ++++++++++++++++++++++++++ .github/workflows/tests_devdeps.yml | 2 +- 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/contexts.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82714470b8..1e6e0a2ff9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: envs: | - linux: check-dependencies latest_crds_contexts: - uses: spacetelescope/crds/.github/workflows/contexts.yml + uses: ./.github/workflows/contexts.yml crds_context: needs: [ latest_crds_contexts ] runs-on: ubuntu-latest diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index df246a580d..05146f9fb2 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -23,7 +23,7 @@ concurrency: jobs: latest_crds_contexts: - uses: spacetelescope/crds/.github/workflows/contexts.yml + uses: ./.github/workflows/contexts.yml crds_context: needs: [ latest_crds_contexts ] runs-on: ubuntu-latest diff --git a/.github/workflows/contexts.yml b/.github/workflows/contexts.yml new file mode 100644 index 0000000000..b3047bdb63 --- /dev/null +++ b/.github/workflows/contexts.yml @@ -0,0 +1,26 @@ +name: contexts + +on: + workflow_call: + outputs: + jwst: + value: ${{ jobs.contexts.outputs.jwst }} + workflow_dispatch: + +jobs: + contexts: + name: retrieve latest CRDS contexts + runs-on: ubuntu-latest + outputs: + jwst: ${{ steps.jwst_crds_context.outputs.pmap }} + steps: + - id: jwst_crds_context + env: + OBSERVATORY: jwst + CRDS_SERVER_URL: https://jwst-crds.stsci.edu + run: > + echo "pmap=$( + curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}", null], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 --connect-timeout 10 | + python -c "import sys, json; print(json.load(sys.stdin)['result'])" + )" >> $GITHUB_OUTPUT + - run: if [[ ! -z "${{ steps.jwst_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.jwst_crds_context.outputs.pmap }}; else exit 1; fi diff --git a/.github/workflows/tests_devdeps.yml b/.github/workflows/tests_devdeps.yml index 35beb87ac0..e5ad86b187 100644 --- a/.github/workflows/tests_devdeps.yml +++ b/.github/workflows/tests_devdeps.yml @@ -32,7 +32,7 @@ concurrency: jobs: latest_crds_contexts: - uses: spacetelescope/crds/.github/workflows/contexts.yml + uses: ./.github/workflows/contexts.yml crds_context: needs: [ latest_crds_contexts ] runs-on: ubuntu-latest