From bb97fe0281c0cd3622da0060c60e8e08718b033d Mon Sep 17 00:00:00 2001 From: Chris Ayers Date: Sat, 18 Dec 2021 07:22:18 -0500 Subject: [PATCH] Create reusable-ci.yml --- .github/workflows/reusable-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/reusable-ci.yml diff --git a/.github/workflows/reusable-ci.yml b/.github/workflows/reusable-ci.yml new file mode 100644 index 0000000..cfd7930 --- /dev/null +++ b/.github/workflows/reusable-ci.yml @@ -0,0 +1,27 @@ +name: Reusable workflow example + +on: + workflow_call: + inputs: + username: + required: true + type: string + secrets: + token: + required: true + +jobs: + example_job: + name: Pass input and secrets to my-action + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: return "Hello ${{ inputs.username }}!" + username: ${{ inputs.username }} + token: ${{ secrets.token }} + + - name: Run a one-line script + run: echo Hello from reuseable workflow, ${{ inputs.username }} + +