From 86f2f3404ea925a2454f4f251d89604567f17bd6 Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 31 Mar 2022 17:03:48 -0400 Subject: [PATCH] Add workflow to re-run Buildmaster builds --- .github/workflows/buildmaster-rebuild.yml | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/buildmaster-rebuild.yml diff --git a/.github/workflows/buildmaster-rebuild.yml b/.github/workflows/buildmaster-rebuild.yml new file mode 100644 index 000000000..d835de1b3 --- /dev/null +++ b/.github/workflows/buildmaster-rebuild.yml @@ -0,0 +1,35 @@ +name: Buildmaster rebuild + +on: + workflow_dispatch: + inputs: + pull_request: + description: Pull request ID + type: number + required: true # remove if we support commit rebuilds later + +jobs: + rebuild: + runs-on: ubuntu-latest + name: Trigger Buildmaster + steps: + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: 3 + - name: Install dependencies + run: | + pip install requests + - name: Clone DFHack + uses: actions/checkout@v1 + with: + fetch-depth: 1 + submodules: false + - name: Run + env: + DFHACK_BUILDMASTER_WEBHOOK_URL: ${{ secrets.DFHACK_BUILDMASTER_WEBHOOK_URL }} + DFHACK_BUILDMASTER_WEBHOOK_SECRET: ${{ secrets.DFHACK_BUILDMASTER_WEBHOOK_SECRET }} + GITHUB_REPO: ${{ github.repository }} + GITHUB_TOKEN: ${{ github.token }} + run: | + python ci/buildmaster-rebuild-pr.py --pull-request ${{ inputs.pull_request }}