From 2e08aae54c9ac0d33dcfbfe55668b652b6604e91 Mon Sep 17 00:00:00 2001 From: alankritdabral Date: Sat, 6 Jan 2024 19:38:52 +0530 Subject: [PATCH] resssuable workflow --- .github/workflows/job1.yml | 20 ++++++++++++++++++++ .github/workflows/job2.yml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/job1.yml create mode 100644 .github/workflows/job2.yml diff --git a/.github/workflows/job1.yml b/.github/workflows/job1.yml new file mode 100644 index 0000000000..f2f3d4bcfb --- /dev/null +++ b/.github/workflows/job1.yml @@ -0,0 +1,20 @@ +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: + - uses: actions/labeler@v4 + with: + repo-token: ${{ secrets.token }} + configuration-path: ${{ inputs.config-path }} diff --git a/.github/workflows/job2.yml b/.github/workflows/job2.yml new file mode 100644 index 0000000000..81c2602fdc --- /dev/null +++ b/.github/workflows/job2.yml @@ -0,0 +1,20 @@ +name: Call a reusable workflow + +on: + pull_request: + branches: + - main + +jobs: + call-workflow: + uses: alankritdabral/tailcall/.github/workflows/job1.yml@v1 + + call-workflow-passing-data: + permissions: + contents: read + pull-requests: write + uses: alankritdabral/tailcall/.github/workflows/job2.yml@main + with: + config-path: .github/labeler.yml + secrets: + token: ${{ secrets.GITHUB_TOKEN }}