From fd14b237e5ac8309194fdc6e45aa029723c78e99 Mon Sep 17 00:00:00 2001 From: Alisdair McDiarmid Date: Wed, 28 Oct 2020 10:22:01 -0400 Subject: [PATCH] Add backport assistant Based on documentation in https://github.com/hashicorp/backport-assistant, using a token from the teamterraform user. --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..74eaa0781 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +--- +name: Backport Assistant Runner + +on: + pull_request_target: + types: + - closed + +jobs: + backport: + if: github.event.pull_request.merged + runs-on: ubuntu-latest + container: hashicorpdev/backport-assistant:0.0.0 + steps: + - name: Run Backport Assistant + run: | + backport-assistant backport + env: + BACKPORT_LABEL_REGEXP: "(?P\\d\\.\\d\\.\\d)-backport" + BACKPORT_TARGET_TEMPLATE: "v{{.target}}" + GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} + GITHUB_REVIEW_TEAMS: "hashicorp/terraform-core"