Skip to content

Commit

Permalink
fixup! Use workflow_dispatch instead of repository_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
SWilson4 committed Sep 13, 2024
1 parent 86aff6b commit 20813d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 57 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/liboqs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
# }
# }' \
Expand All @@ -35,4 +29,3 @@ jobs:
uses: ./.github/workflows/release-test.yml
with:
liboqs_ref: ${{ inputs.liboqs_ref }}
provider_ref: ${{ inputs.provider_ref }}
52 changes: 3 additions & 49 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,13 @@ 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:
description: 'liboqs branch or tag'
required: true
default: 'main'
type: string
provider_ref:
description: 'oqs-provider branch or tag'
required: true
default: 'main'
type: string

jobs:
release-test:
Expand All @@ -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

0 comments on commit 20813d2

Please sign in to comment.