Skip to content

Release Fleet against rancher/rancher #182

Release Fleet against rancher/rancher

Release Fleet against rancher/rancher #182

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: runs-on,runner=4cpu-linux-x64,run-id=${{ github.run_id }}
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
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TO_FORKS_SUBMIT_PRS }}
working-directory: ./rancher/
run: |
../fleet/.github/scripts/create-pr.sh ${{github.event.inputs.rancher_ref}} ${{github.event.inputs.new_fleet}} ${{github.event.inputs.new_chart}} rancher