Skip to content

Update GKE operator in rancher/charts #17

Update GKE operator in rancher/charts

Update GKE operator in rancher/charts #17

name: Update Operator in rancher/charts
on:
workflow_dispatch:
inputs:
ref:
description: "Branch to use for GitHub action workflow"
required: true
default: "master"
operator_path:
description: "Operator github repo for the workflow"
required: true
default: "gke-operator"
charts_ref:
description: "Submit PR against the following rancher/charts branch (e.g. dev-v2.7)"
required: true
default: "dev-v2.7"
prev_operator_version:
description: "Previous operator version (e.g. 1.1.0-rc2)"
required: true
default: ""
new_operator_version:
description: "New operator 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 operator 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: ${{github.event.inputs.operator_path}}
- name: Checkout rancher/charts
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: rancher/charts
ref: ${{github.event.inputs.charts_ref}}
path: charts
- name: Run release script
run: ./${{github.event.inputs.operator_path}}/.github/scripts/update-rancher-charts.sh ${{github.event.inputs.prev_operator_version}} ${{github.event.inputs.new_operator_version}} ${{github.event.inputs.prev_chart}} ${{github.event.inputs.new_chart}} ${{github.event.inputs.should_replace}}
env:
OPERATOR: ${{github.event.inputs.operator_path}}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{secrets.CI_BOT_TOKEN}}
push-to-fork: highlander-ci-bot/charts
title: 'Update ${{github.event.inputs.operator_path}} to v${{github.event.inputs.new_operator_version}}'
body: |
Update ${{github.event.inputs.operator_path}} to v${{github.event.inputs.new_operator_version}}
Changelog: https://github.com/rancher/${{github.event.inputs.operator_path}}/releases/tag/v${{github.event.inputs.new_operator_version}}
cc @rancher/highlander
branch-suffix: timestamp
base: ${{github.event.inputs.charts_ref}}
path: ./charts/