From 20813d2f0294a7975546b77a75c99c3088f85736 Mon Sep 17 00:00:00 2001 From: Spencer Wilson Date: Thu, 12 Sep 2024 10:16:01 -0400 Subject: [PATCH] fixup! Use workflow_dispatch instead of repository_dispatch --- .github/workflows/liboqs-release.yml | 9 +---- .github/workflows/release-test.yml | 52 ++-------------------------- 2 files changed, 4 insertions(+), 57 deletions(-) diff --git a/.github/workflows/liboqs-release.yml b/.github/workflows/liboqs-release.yml index d2f78350..71cecb6f 100644 --- a/.github/workflows/liboqs-release.yml +++ b/.github/workflows/liboqs-release.yml @@ -8,11 +8,6 @@ on: required: true default: 'main' type: string - provider_ref: - description: 'oqs-provider branch or tag' - required: true - default: 'main' - type: string # This workflow can be triggered from either the GitHub Actions web UI or a shell. # To use a shell, generate a GitHub personal access token and run the following command: @@ -22,9 +17,8 @@ on: # --header "Authorization: Bearer YOUR_TOKEN_HERE" \ # --header "X-GitHub-Api-Version: 2022-11-28" \ # --data '{ -# "event_type": "liboqs-release", +# "ref": "PROVIDER_BRANCH_OR_TAG_HERE", # "inputs": { -# "provider_ref": "PROVIDER_BRANCH_OR_TAG_HERE", # "liboqs_ref": "LIBOQS_BRANCH_OR_TAG_HERE" # } # }' \ @@ -35,4 +29,3 @@ jobs: uses: ./.github/workflows/release-test.yml with: liboqs_ref: ${{ inputs.liboqs_ref }} - provider_ref: ${{ inputs.provider_ref }} diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index e439e418..884224db 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -11,11 +11,6 @@ on: required: true default: 'main' type: string - provider_ref: - description: 'oqs-provider branch or tag' - required: true - default: 'main' - type: string workflow_dispatch: inputs: liboqs_ref: @@ -23,11 +18,6 @@ on: required: true default: 'main' type: string - provider_ref: - description: 'oqs-provider branch or tag' - required: true - default: 'main' - type: string jobs: release-test: @@ -36,49 +26,13 @@ jobs: image: openquantumsafe/ci-ubuntu-jammy:latest steps: - - name: Check if requested oqs-provider ref exists - env: - provider_ref: ${{ inputs.provider_ref }} - run: | - # try both branch and tag - wget --quiet \ - --header "Accept: application/vnd.github+json" \ - --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - --header "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/open-quantum-safe/oqs-provider/branches/$provider_ref || \ - wget --quiet \ - --header "Accept: application/vnd.github+json" \ - --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - --header "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/open-quantum-safe/oqs-provider/git/ref/tags/$provider_ref \ - && echo "provider_ref=$provider_ref" >> "$GITHUB_ENV" \ - || echo "provider_ref=main" >> "$GITHUB_ENV" - - name: Check if requested liboqs ref exists - env: - provider_ref: ${{ inputs.liboqs_ref }} - run: | - # try both branch and tag - wget --quiet \ - --header "Accept: application/vnd.github+json" \ - --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - --header "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/open-quantum-safe/liboqs/branches/$liboqs_ref || \ - wget --quiet \ - --header "Accept: application/vnd.github+json" \ - --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - --header "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/open-quantum-safe/liboqs/git/ref/tags/$liboqs_ref \ - && echo "liboqs_ref=$liboqs_ref" >> "$GITHUB_ENV" \ - || echo "liboqs_ref=main" >> "$GITHUB_ENV" - - name: Checkout oqs-provider on requested ref if it exists; otherwise, fall back to main + - name: Checkout oqs-provider uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4 - with: - ref: ${{ env.provider_ref }} - - name: Checkout liboqs at requested ref if it exists; otherwise, fall back to main + - name: Checkout liboqs uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4 with: repository: open-quantum-safe/liboqs path: liboqs - ref: ${{ env.liboqs_ref }} + ref: ${{ inputs.liboqs_ref }} - name: Run release tests run: OPENSSL_BRANCH=master ./scripts/release-test-ci.sh