chore(ci): stop hardcoding stable-branch (#2605)

Instead we can define an environment variable for github actions.

For things where we can't, globs/regex is probably good enough.

When we branch/stabilize "stable-f45" then we will delete the old one
anyway, so we shouldn't be in a situation where we'll get spammed with
like 3 PRs.

The only remaining things where it's hardcoded is the pull config and
docs.
This commit is contained in:
renner 2026-09-19 03:09:54 +00:00 committed by GitHub
parent 8ae1b42bb0
commit 1d7aceb03b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 9 deletions

View file

@ -4,7 +4,7 @@
"config:best-practices"
],
"baseBranchPatterns": ["main", "stable-f44"],
"baseBranchPatterns": ["main", "/^stable-f[0-9][0-9]$/"],
// Do not rebase when the default branch is updated
"rebaseWhen": "never",
@ -59,7 +59,7 @@
],
// Brew and common are not "security updates", they have to go through :testing/main first
// to reach a stable release
"matchBaseBranches": ["stable-f44"],
"matchBaseBranches": ["/^stable-f[0-9][0-9]$/"],
"enabled": false
},
{

View file

@ -2,17 +2,17 @@ name: Latest Images
on:
push:
branches:
- stable-f44
- 'stable-f[0-9][0-9]'
paths-ignore:
- "**.md"
- ".github/workflows/moderator.yml"
- ".github/workflows/scorecard.yml"
merge_group:
branches:
- stable-f44
- 'stable-f[0-9][0-9]'
pull_request:
branches:
- stable-f44
- 'stable-f[0-9][0-9]'
paths-ignore:
- "**.md"
- ".github/workflows/moderator.yml"

View file

@ -6,7 +6,7 @@ on:
# We still want to know if things are broken
pull_request:
branches:
- stable-f44
- 'stable-f[0-9][0-9]'
paths-ignore:
- "**.md"
- ".github/workflows/moderator.yml"

View file

@ -47,7 +47,7 @@ jobs:
with:
# Use the dynamically generated GitHub App token here too
github_token: ${{ steps.generate-token.outputs.token }}
target_branches: "stable-f44"
target_branches: ${{ vars.STABLE_BRANCH }}
add_labels: "backported-to-stable"
pull_title: '${pull_title} [Backport ${target_branch}]'
pull_description: |

View file

@ -35,7 +35,7 @@ jobs:
with:
persist-credentials: false
fetch-depth: 500
ref: stable-f44
ref: ${{ vars.STABLE_BRANCH }}
- name: Install Just
run: |

View file

@ -22,7 +22,7 @@ jobs:
- name: Trigger Stable Image Build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: stable-f44
BRANCH: ${{ vars.STABLE_BRANCH }}
run: |
gh workflow run \
build-image-stable.yml \