2023-03-22 13:17:19 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-04-28 21:23:39 +00:00
|
|
|
# This action creates downstream PRs for PRs with backport labels defined.
|
|
|
|
# See docs here: https://github.com/hashicorp/backport-assistant
|
|
|
|
|
|
|
|
name: Backport Assistant Runner
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
- labeled
|
2022-05-06 19:38:02 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2022-05-19 14:01:57 +00:00
|
|
|
- 'release/*.*.x'
|
2022-04-28 21:23:39 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
backport:
|
|
|
|
if: github.event.pull_request.merged
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-28 18:21:04 +00:00
|
|
|
container: hashicorpdev/backport-assistant:0.3.0
|
2022-04-28 21:23:39 +00:00
|
|
|
steps:
|
|
|
|
- name: Run Backport Assistant for release branches
|
|
|
|
run: |
|
2022-11-28 18:21:04 +00:00
|
|
|
backport-assistant backport -merge-method=squash -gh-automerge
|
2022-04-28 21:23:39 +00:00
|
|
|
env:
|
2022-05-03 16:33:56 +00:00
|
|
|
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+)"
|
2022-04-28 21:23:39 +00:00
|
|
|
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}.x"
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|