-
Notifications
You must be signed in to change notification settings - Fork 229
68 lines (66 loc) · 2.47 KB
/
release-against-charts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release Fleet against rancher/charts
on:
workflow_dispatch:
inputs:
ref:
description: "Branch to use for GitHub action workflow"
required: true
default: "main"
charts_ref:
description: "Submit PR against the following rancher/charts branch (e.g. dev-v2.7)"
required: true
default: "dev-v2.9"
prev_fleet:
description: "Previous Fleet version (e.g. 0.6.0-rc.3)"
required: true
default: ""
new_fleet:
description: "New Fleet version"
required: true
default: ""
prev_chart:
description: "Previous Rancher Chart version (e.g. 101.1.0)"
required: true
default: ""
new_chart:
description: "New Rancher Chart version"
required: true
default: ""
should_replace:
description: "Should the old Fleet version be replaced/removed? (e.g. true in case of release candidate bumps)"
required: true
default: "true"
jobs:
create-rancher-charts-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.inputs.ref}}
path: fleet
- name: Checkout rancher/charts
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: rancher/charts
ref: ${{github.event.inputs.charts_ref}}
path: charts
- name: Install dependencies
run: sudo snap install yq --channel=v4/stable
- name: Run release script
run: |
export CHARTS_DIR="${GITHUB_WORKSPACE}/charts"
./fleet/.github/scripts/release-against-charts.sh ${{github.event.inputs.prev_fleet}} ${{github.event.inputs.new_fleet}} ${{github.event.inputs.prev_chart}} ${{github.event.inputs.new_chart}} ${{github.event.inputs.should_replace}}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{secrets.PUSH_TO_FORKS_SUBMIT_PRS}}
push-to-fork: rancherbot/charts
title: '[${{github.event.inputs.charts_ref}}] fleet ${{github.event.inputs.new_chart}}+up${{github.event.inputs.new_fleet}} update'
body: |
Update Fleet to v${{github.event.inputs.new_fleet}}
Changelog: https://github.com/rancher/fleet/releases/tag/v${{github.event.inputs.new_fleet}}
branch-suffix: timestamp
base: ${{github.event.inputs.charts_ref}}
path: ./charts/