Skip to content

Commit b984718

Browse files
pierreprinettiEmilienM
authored andcommitted
Instrument backporting to v1
The stable branch is now `v1`. Non-breaking changes will be backported by applying a `backport-v1` label.
1 parent ea71744 commit b984718

File tree

4 files changed

+48
-6
lines changed

4 files changed

+48
-6
lines changed

.github/backport-labels.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- name: backport-v1
2+
description: This PR will be backported to v1
3+
color: '30ABB9'

.github/workflows/backport_v1.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pull Request backporting
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
- labeled
8+
9+
jobs:
10+
backporting:
11+
name: "Backporting"
12+
# Only react to merged PRs for security reasons.
13+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
14+
if: >
15+
github.event.pull_request.merged
16+
&& (
17+
github.event.action == 'closed'
18+
&& contains(github.event.pull_request.labels.*.name, 'backport-v1')
19+
|| (
20+
github.event.action == 'labeled'
21+
&& contains(github.event.label.name, 'backport-v1')
22+
)
23+
)
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Backporting
27+
uses: pierreprinetti/backport@v1
28+
with:
29+
target-branch: v1
30+
pull-request: ${{ github.event.pull_request.url }}
31+
auth: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
branches:
55
- master
66
paths:
7-
- .github/semver-labels.yaml
7+
- .github/ensure-labels.yaml
8+
- .github/backport-labels.yaml
89
- .github/workflows/semver-labels.yaml
910
jobs:
1011
semver:
@@ -16,3 +17,12 @@ jobs:
1617
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1718
with:
1819
manifest: .github/semver-labels.yaml
20+
backport:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: micnncim/action-label-syncer@v1
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
with:
28+
manifest: .github/backport-labels.yaml

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Gophercloud: an OpenStack SDK for Go
2-
[![Build Status](https://travis-ci.org/gophercloud/gophercloud.svg?branch=master)](https://travis-ci.org/gophercloud/gophercloud)
32
[![Coverage Status](https://coveralls.io/repos/github/gophercloud/gophercloud/badge.svg?branch=master)](https://coveralls.io/github/gophercloud/gophercloud?branch=master)
43

5-
Gophercloud is an OpenStack Go SDK.
4+
[Reference documentation](http://godoc.org/github.com/gophercloud/gophercloud)
65

7-
## Useful links
6+
Gophercloud is a Go SDK for OpenStack.
87

9-
* [Reference documentation](http://godoc.org/github.com/gophercloud/gophercloud)
10-
* [Effective Go](https://golang.org/doc/effective_go.html)
8+
This is the development branch of Gophercloud; stable releases are cut from the branch `v1`.
119

1210
## How to install
1311

0 commit comments

Comments
 (0)