Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.8] Update GKE workflow for updating Rancher charts #208

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions .github/workflows/update-rancher-charts.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
name: Update Operator in rancher/charts
name: Update GKE 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)"
prev_gke_operator:
description: "Previous GKE operator version (e.g. 1.1.0-rc2)"
required: true
default: ""
new_operator_version:
description: "New operator version"
new_gke_operator:
description: "New GKE operator version"
required: true
default: ""
prev_chart:
Expand All @@ -31,7 +27,7 @@ on:
required: true
default: ""
should_replace:
description: "Should the old operator version be replaced/removed? (e.g. true in case of release candidate bumps)"
description: "Should the old GKE operator version be replaced/removed? (e.g. true in case of release candidate bumps)"
required: true
default: "true"

Expand All @@ -43,7 +39,7 @@ jobs:
with:
fetch-depth: 0
ref: ${{github.event.inputs.ref}}
path: ${{github.event.inputs.operator_path}}
path: gke-operator
- name: Checkout rancher/charts
uses: actions/checkout@v3
with:
Expand All @@ -52,19 +48,17 @@ jobs:
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}}
run: ./gke-operator/.github/scripts/update-rancher-charts.sh ${{github.event.inputs.prev_gke_operator}} ${{github.event.inputs.new_gke_operator}} ${{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@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}}'
title: 'Update GKE operator to v${{github.event.inputs.new_gke_operator}}'
body: |
Update ${{github.event.inputs.operator_path}} to v${{github.event.inputs.new_operator_version}}
Update GKE operator to v${{github.event.inputs.new_gke_operator}}

Changelog: https://github.com/rancher/${{github.event.inputs.operator_path}}/releases/tag/v${{github.event.inputs.new_operator_version}}
Changelog: https://github.com/rancher/gke-operator/releases/tag/v${{github.event.inputs.new_gke_operator}}

cc @rancher/highlander
branch-suffix: timestamp
Expand Down