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 .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"fork": false,
"autoMerge": true,
"repoOwner": "redpanda-data",
"repoName": "redpanda-operator",
"targetBranchChoices": ["release/v2.3.x"],
Expand Down
7 changes: 7 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
labels:
"backport":
color: "ededed"
"no-changelog":
color: "8f1402"
"v2.3.9":
color: "ededed"
16 changes: 16 additions & 0 deletions .github/workflows/auto-approve-backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto-Approve Backport

on:
pull_request_target:
branches-ignore:
- main

jobs:
approve:
name: Auto-approve backport
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'backport/') && (github.actor == 'vbotbuildovich')
permissions:
pull-requests: write
steps:
- uses: hmarr/auto-approve-action@v4
25 changes: 25 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Backport

on:
pull_request_target:
types: ["labeled", "closed"]

jobs:
backport:
name: Backport PR
if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport'))
runs-on: ubuntu-latest
steps:
- name: Backport Action
uses: sorenlouv/backport-github-action@v9.5.1
with:
# TODO: exchange this token with a PAT of a user like our build bot
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Info log
if: ${{ success() }}
run: cat ~/.backport/backport.info.log

- name: Debug log
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log
33 changes: 33 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Changelog

on:
pull_request:
types: ["labeled", "unlabeled", "opened", "synchronize"]
branches:
# only check for changelog entries going into main
- main

jobs:
changed_files:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
runs-on: ubuntu-latest
name: Check for changelog entry
steps:
- uses: actions/checkout@v4

- name: Get all changed changelog files
id: changed-changelog-files
uses: tj-actions/changed-files@v45
with:
files: |
.changes/unreleased/**.yaml

- name: Pass
if: steps.changed-changelog-files.outputs.any_changed == 'true'
run: |
echo "Found changelog entry"

- name: Fail
if: steps.changed-changelog-files.outputs.any_changed != 'true'
run: |
echo "No changelog entry detected." && exit 1
23 changes: 23 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Manage Labels

on:
push:
branches:
- main
paths:
- .github/labels.yml
workflow_dispatch:

concurrency: manage-labels

jobs:
manage-labels:
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oliversalzburg/action-label-manager@v0.0.9
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}