diff --git a/.github/workflows/entry_point.yml b/.github/workflows/entry_point.yml new file mode 100644 index 0000000000..ed4ce200cd --- /dev/null +++ b/.github/workflows/entry_point.yml @@ -0,0 +1,54 @@ +name: Regression Suite Entry Point CI/CD +run-name : Queue ${{ github.event_name == 'push' && 'CI' || github.event.label.name }} (${{ github.event_name }}) + +on: + push: + branches: [ master, develop ] +# See https://stackoverflow.com/a/78444521 and +# https://github.com/orgs/community/discussions/26874#discussioncomment-3253755 +# as well as official (but buried) documentation : +# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull-request-events-for-forked-repositories-2 + pull_request: + types: [ labeled ] + +# Write our tests out this way for easier legibility +# testsSet : +# - key : value +# key : value +# tests : +# - value +# - value +# - < next test > +# https://stackoverflow.com/a/68940067 +jobs: + queue_tests: + if : ${{ contains( fromJson('["compile-tests","all-tests"]'), github.event.label.name ) || github.event_name == 'push' }} + name: Queue Test (${{ github.event_name == 'push' && github.ref_name || github.event.label.name }}) + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Dispatch Regression Suite + run : | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ github.token }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/dispatches \ + --data-binary @- << EOF + { + "ref" : "${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || github.event.pull_request.base.ref }}", + "inputs" : + { + "event_name" : "${{ github.event_name }}", + "event_number" : "${{ github.event.number }}", + "test" : "${{ github.event.label.name }}", + "ref" : "${{ github.ref }}", + "sha" : "${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }}" + } + } + EOF + + +