Release Fleet against rancher/charts #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |