Skip to content

Commit

Permalink
Update GKE workflow for updating Rancher charts
Browse files Browse the repository at this point in the history
  • Loading branch information
mjura committed Nov 2, 2023
1 parent ad13890 commit c901ecd
Showing 1 changed file with 11 additions and 17 deletions.
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

0 comments on commit c901ecd

Please sign in to comment.