Skip to content

Commit 8056eff

Browse files
committed
Run CI on the release-line branches
The default branch is 21.X.X now, and a release line is named after the Java version it is built for, so the workflows that watched main alone also take '*.X.X': CI, CodeQL, the dependency graph, the SHA-pinning and zizmor checks. The PR updater follows 21.X.X, the base of every pull request, and dependabot loses its target-branch so that it opens its pull requests against the default branch, whichever line that is. Releases need nothing: release.yml runs on a tag, and JReleaser never compares the branch.
1 parent fb4480c commit 8056eff

7 files changed

Lines changed: 13 additions & 11 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
version: 2
22
# A release is proposed only once it is a week old: a compromised or broken release is usually pulled
33
# within days. The cooldown holds back version updates only; security updates still come at once.
4+
#
5+
# No target-branch: the pull requests go to the default branch, which is the current release line,
6+
# 21.X.X today.
47
updates:
58
- package-ecosystem: "github-actions"
69
directory: "/"
710
schedule:
811
interval: "weekly"
9-
target-branch: "main"
1012
cooldown:
1113
default-days: 7
1214

1315
- package-ecosystem: "gradle"
1416
directory: "/"
1517
schedule:
1618
interval: "weekly"
17-
target-branch: "main"
1819
cooldown:
1920
default-days: 7

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- '*.X.X' # a release line is named after the Java version it is built for: 21.X.X
78
pull_request:
89

910
permissions:
@@ -48,7 +49,7 @@ jobs:
4849
# jobs and nothing they build is kept. The code is still compiled for Java 21 by JDK 21, as in the
4950
# release; -PjavaRuntime moves only the test JVMs, and with them the javac whose internals the
5051
# formatter parses with. The IntelliJ plugin's tests stay on the runtime of the IDE they start.
51-
# JDK 21 itself is `build`, the check the main branch requires.
52+
# JDK 21 itself is `build`, the check the default branch requires.
5253
jdk:
5354
name: build (JDK ${{ matrix.jdk }})
5455
runs-on: ubuntu-latest

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: [ 'main', '*.X.X' ]
66
pull_request:
7-
branches: [ 'main' ]
7+
branches: [ 'main', '*.X.X' ]
88
schedule:
99
- cron: '33 9 * * 6'
1010

‎.github/workflows/dependency-submission.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Submit dependency graph
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: [ 'main', '*.X.X' ]
66

77
permissions:
88
contents: write

‎.github/workflows/sha-pinning-check.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Ensure SHA-pinned actions
22

33
on:
44
pull_request:
5-
branches: [ 'main' ]
5+
branches: [ 'main', '*.X.X' ]
66
push:
7-
branches: [ 'main' ]
7+
branches: [ 'main', '*.X.X' ]
88

99
permissions:
1010
contents: read

‎.github/workflows/update-pr-branch.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update PR branches
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: [ '21.X.X' ] # the default branch, the base of every pull request
66
schedule:
77
# Run every hour to catch stuck PRs
88
- cron: '0 * * * *'
@@ -18,6 +18,6 @@ jobs:
1818
- uses: adRise/update-pr-branch@e96e796f4ab23ab388016fdaed7092de99bd71cf # v0.11.1
1919
with:
2020
token: ${{ secrets.BOT_PAT }}
21-
base: 'main'
21+
base: '21.X.X'
2222
required_approval_count: 1
2323
require_passed_checks: true

‎.github/workflows/zizmor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: GitHub Actions Security Analysis with zizmor 🌈
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: ["main", "*.X.X"]
66
pull_request:
77
branches: ["**"]
88

0 commit comments

Comments
 (0)