Skip to content

Release Fleet against rancher/charts #197

Release Fleet against rancher/charts

Release Fleet against rancher/charts #197

name: Release Fleet against rancher/charts
on:
workflow_dispatch:
inputs:
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: 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/charts
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: rancher/charts
ref: ${{github.event.inputs.charts_ref}}
path: charts
- uses: actions/setup-go@v5
with:
go-version: '1.22.*'
- 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
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TO_FORKS_SUBMIT_PRS }}
working-directory: ./charts/
run: |
../fleet/.github/scripts/create-pr.sh ${{github.event.inputs.charts_ref}} ${{github.event.inputs.new_fleet}} ${{github.event.inputs.new_chart}} charts