Skip to content

Commit 63c755b

Browse files
authored
Merge pull request #458 from asgrim/455-fix-trunk-actions
455: fix trunk actions not running for nightly builds
2 parents 355966b + fbe7f77 commit 63c755b

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

.github/workflows/docker-nightly-image-push.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: "Nightly Docker Image Build"
22

33
on:
4-
# Runs on pushes targeting the default branch
54
push:
6-
branches: ["main"]
5+
branches: ["*.*.x"]
76

87
# Allows you to run this workflow manually from the Actions tab
98
workflow_dispatch:
@@ -13,6 +12,7 @@ permissions:
1312

1413
jobs:
1514
build-phar:
15+
if: github.ref_name == github.event.repository.default_branch
1616
# See build-phar.yml for a list of the permissions and why they are needed
1717
permissions:
1818
contents: read
@@ -21,6 +21,7 @@ jobs:
2121
uses: ./.github/workflows/build-phar.yml
2222

2323
build-and-push-docker-image:
24+
if: github.ref_name == github.event.repository.default_branch
2425
needs: build-phar
2526
# See build-and-push-docker-image.yml for a list of the permissions and why they are needed
2627
permissions:

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: "Publish Documentation microsite"
22

33
on:
4-
# Runs on pushes targeting the default branch
54
push:
6-
branches: ["main"]
5+
branches: ["*.*.x"]
76

87
# Allows you to run this workflow manually from the Actions tab
98
workflow_dispatch:
@@ -19,6 +18,7 @@ concurrency:
1918

2019
jobs:
2120
build-phar:
21+
if: github.ref_name == github.event.repository.default_branch
2222
# See build-phar.yml for a list of the permissions and why they are needed
2323
permissions:
2424
contents: read
@@ -27,6 +27,7 @@ jobs:
2727
uses: ./.github/workflows/build-phar.yml
2828

2929
build-docs-package:
30+
if: github.ref_name == github.event.repository.default_branch
3031
runs-on: ubuntu-latest
3132
needs:
3233
- build-phar
@@ -51,6 +52,7 @@ jobs:
5152
path: docs-package
5253

5354
deploy:
55+
if: github.ref_name == github.event.repository.default_branch
5456
environment:
5557
name: github-pages
5658
url: ${{ steps.deployment.outputs.page_url }}

docs/pie-maintainers-handbook.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,32 @@ order: 3
66

77
## Branching strategy
88

9-
At the moment, we operate a single `main` branch, and feature branches. In the
10-
future, to better facilitate patch versions, we may switch to a versioned
11-
branching strategy.
9+
Since 1.3.0, we operate a branch per minor release, with an `x` for the patch
10+
version, for example, 1.3 series branch is named `1.3.x`, 1.4 is named `1.4.x`
11+
and so on. This allows releasing patch versions on older releases if a bug is
12+
found, for example.
13+
14+
### New features
15+
16+
New feature branches should be based on the latest trunk (i.e. the default
17+
branch). Once merged, that feature will be part of the next minor release.
18+
19+
### Bugfixes/Patches
20+
21+
Bugfixes/patches should be based on the oldest supported or desired patch
22+
version. For example, if a bug affects the 1.3 series, a PR should be made
23+
from the feature branch to the `1.3.x` branch.
1224

1325
## Release process
1426

15-
Make sure you have the latest version to be released, for example, one of:
27+
Make sure you have the latest version of the trunk to be released, for example,
28+
one of:
1629

1730
```shell
18-
# Using git reset (note: discards any local commits on `main`)
19-
git checkout main && git fetch upstream && git reset --hard upstream/main
20-
# or, using git pull (use `--ff-only` to avoid making merge commits)
21-
git checkout main && git pull --ff-only upstream main
31+
# Using git reset (note: discards any local commits on `1.3.x`)
32+
git checkout 1.3.x && git fetch upstream && git reset --hard upstream/1.3.x
33+
# or, using git pull (note: use `--ff-only` to avoid making merge commits)
34+
git checkout 1.3.x && git pull --ff-only upstream 1.3.x
2235
```
2336

2437
Prepare a changelog, set the version and milestone to be released, e.g.:
@@ -62,3 +75,9 @@ verify everything is correct, and publish the release.
6275
```shell
6376
rm CHANGELOG-$PIE_VERSION.md
6477
```
78+
79+
### Minor or Major releases: updating branches
80+
81+
Once a minor or major release is made, a new trunk should be created. For
82+
example, if you just released `1.3.0` from the `1.3.x` branch, you should then
83+
create a new `1.4.x` branch, and set that as the default.

0 commit comments

Comments
 (0)