Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/automatic_backport_tracks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
automatic_backport_tracks:
- track/1.0
18 changes: 18 additions & 0 deletions .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: On Pull Request

# On pull_request, we:
# * create backport labels if it is against main, only when the PR is opened/reopened

on:
pull_request:

Comment thread
mvlassis marked this conversation as resolved.
jobs:
Comment thread
mvlassis marked this conversation as resolved.

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 "
23 changes: 23 additions & 0 deletions .github/workflows/on_pull_request_closed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: On Pull Request Closed

# When a pull request is pushed on the main branch, automatically
# create backport PRs according to the labels on the pull request.
# If there are conflicts, create a PR but leave it as draft.
Comment thread
mvlassis marked this conversation as resolved.

on:
pull_request_target:
types: [closed]
branches:
- main
Comment thread
mvlassis marked this conversation as resolved.

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
Loading