mirror of
https://github.com/github/codeql.git
synced 2025-12-28 14:46:33 +01:00
Add Reusable Workflow test
This commit is contained in:
18
ql/lib/test/.github/workflows/calling_workflow.yml
vendored
Normal file
18
ql/lib/test/.github/workflows/calling_workflow.yml
vendored
Normal file
@@ -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
|
||||
18
ql/lib/test/.github/workflows/reusable_workflow.yml
vendored
Normal file
18
ql/lib/test/.github/workflows/reusable_workflow.yml
vendored
Normal file
@@ -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 }}
|
||||
Reference in New Issue
Block a user