From b0844db1dff8c2a2a57cda11055ddc227189ee9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 14 May 2023 23:17:06 +0200 Subject: [PATCH] Create dispatch.yml --- .github/workflows/dispatch.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/dispatch.yml diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml new file mode 100644 index 00000000..097524cf --- /dev/null +++ b/.github/workflows/dispatch.yml @@ -0,0 +1,20 @@ +name: Dispatcher +on: + push: + branches: ['6'] +jobs: + dispatch: + name: Dispatch + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Extract branch name + shell: bash + run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + id: extract_branch + - name: Dispatch to workflows + run: | + curl -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.DISPATCH_TOKEN }}" \ + --request POST \ + --data '{"event_type": "push_to_main_repo", "client_payload": { "branch": "${{ steps.extract_branch.outputs.branch }}" }}' https://api.github.com/repos/MultiMC/Build/dispatches