Skip to content

Release Fleet against rancher/rancher #163

Release Fleet against rancher/rancher

Release Fleet against rancher/rancher #163

name: Release Fleet against rancher/rancher
on:
workflow_dispatch:
inputs:
rancher_ref:
description: "Submit PR against the following rancher/rancher branch (e.g. release/v2.7)"
required: true
default: "release/v2.9"
new_fleet:
description: "New Fleet version (e.g. 0.8.0-rc.3)"
required: true
default: ""
new_chart:
description: "New Rancher Chart version (e.g. 103.1.0)"
required: true
default: ""
should_bump_api:
description: "Should the Fleet api be bumped in the Rancher repo? (If the API in github.com/rancher/fleet/pkg/apis has changed or the release is for a final release, then the API needs to be bumped (set to true ), otherwise use false .)"
required: true
default: "false"
go_version:
description: "Go version used for bumping the api. This should be the same version as in the go.mod file of the project."
required: true
default: '1.22.*'
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_GO_VERSION: ${{github.event.inputs.go_version}}
jobs:
create-rancher-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: fleet
- name: Checkout rancher/rancher
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: rancher/rancher
ref: ${{github.event.inputs.rancher_ref}}
path: rancher
- uses: actions/setup-go@v5
with:
go-version: ${{ env.SETUP_GO_VERSION }}
- name: Run release script
run: |
export CHARTS_DIR="${GITHUB_WORKSPACE}/rancher"
./fleet/.github/scripts/release-against-rancher.sh ${{github.event.inputs.new_fleet}} ${{github.event.inputs.new_chart}} ${{github.event.inputs.should_bump_api}}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{secrets.PUSH_TO_FORKS_SUBMIT_PRS}}
push-to-fork: rancherbot/rancher
title: '[${{github.event.inputs.rancher_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.rancher_ref}}
path: ./rancher/