diff --git a/.github/automatic_backport_tracks.yaml b/.github/automatic_backport_tracks.yaml new file mode 100644 index 0000000..d2b3fde --- /dev/null +++ b/.github/automatic_backport_tracks.yaml @@ -0,0 +1,2 @@ +automatic_backport_tracks: + - track/1.9 \ No newline at end of file diff --git a/.github/workflows/on_pull_request.yaml b/.github/workflows/on_pull_request.yaml index a59378a..e55eba9 100644 --- a/.github/workflows/on_pull_request.yaml +++ b/.github/workflows/on_pull_request.yaml @@ -8,6 +8,15 @@ on: pull_request: jobs: + + populate-labels: + name: Populate labels + if: github.base_ref == 'main' && (github.event.action == 'opened' || github.event.action == 'reopened') + uses: canonical/charmed-kubeflow-workflows/.github/workflows/populate-labels.yaml@main + secrets: inherit + with: + track_file_path: ".github/automatic_backport_tracks.yaml" + label_prefix: "backport " build-charm: name: Build charm runs-on: ubuntu-24.04 diff --git a/.github/workflows/on_pull_request_closed.yaml b/.github/workflows/on_pull_request_closed.yaml new file mode 100644 index 0000000..c2ec251 --- /dev/null +++ b/.github/workflows/on_pull_request_closed.yaml @@ -0,0 +1,18 @@ +name: On Pull Request Closed + +on: + pull_request_target: + types: [closed] + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + backport: + name: Backport pull request + if: github.event.pull_request.merged + uses: canonical/charmed-kubeflow-workflows/.github/workflows/backport-pr.yaml@main + secrets: inherit