diff --git a/ql/lib/test/.github/workflows/calling_workflow.yml b/ql/lib/test/.github/workflows/calling_workflow.yml new file mode 100644 index 00000000000..3b0ab8f18d3 --- /dev/null +++ b/ql/lib/test/.github/workflows/calling_workflow.yml @@ -0,0 +1,18 @@ +on: push + +jobs: + call-workflow-1-in-local-repo: + uses: octo-org/this-repo/.github/workflows/reusable_workflow.yml@172239021f7ba04fe7327647b213799853a9eb89 + with: + config-path: ${{ github.event.pull_request.head.ref }} + secrets: inherit + call-workflow-2-in-local-repo: + uses: ./.github/workflows/reusable_workflow.yml + with: + config-path: ${{ github.event.pull_request.head.ref }} + secrets: inherit + call-workflow-in-another-repo: + uses: octo-org/another-repo/.github/workflows/workflow.yml@v1 + with: + config-path: ${{ github.event.pull_request.head.ref }} + secrets: inherit diff --git a/ql/lib/test/.github/workflows/reusable_workflow.yml b/ql/lib/test/.github/workflows/reusable_workflow.yml new file mode 100644 index 00000000000..f31c8a63d74 --- /dev/null +++ b/ql/lib/test/.github/workflows/reusable_workflow.yml @@ -0,0 +1,18 @@ +name: Reusable workflow example + +on: + workflow_call: + inputs: + config-path: + required: true + type: string + secrets: + token: + required: true + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - id: sink + run: echo ${{ inputs.config-path }}