Skip to content

🌱 Bump golang.org/x/oauth2 from 0.30.0 to 0.31.0 #41

🌱 Bump golang.org/x/oauth2 from 0.30.0 to 0.31.0

🌱 Bump golang.org/x/oauth2 from 0.30.0 to 0.31.0 #41

name: Update Operator in rancher/charts

Check failure on line 1 in .github/workflows/update-rancher-charts.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-rancher-charts.yaml

Invalid workflow file

(Line: 73, Col: 19): Unexpected symbol: 'new_operator_version}\n\nChangelog:'. Located at position 21 within expression: github.event.inputs.new_operator_version}\n\nChangelog: https://github.com/rancher/${{github.event.inputs.operator_path
on:
workflow_dispatch:
inputs:
ref:
description: "Branch to use for GitHub action workflow"
required: true
default: "release-v2.9"
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.9"
prev_operator_version:
description: "Previous operator version (e.g. 1.2.0-rc.1)"
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}}
persist-credentials: false
- name: Checkout rancher/charts
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: rancher/charts
ref: ${{github.event.inputs.charts_ref}}
path: charts
persist-credentials: false
- name: Run release script # release script is responsible for git add/commit
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: Set timestamp
run: echo "TIMESTAMP=$(date +'%s')" >> "$GITHUB_ENV"
- name: Push changes
env:
USERNAME: highlander-ci-bot
TOKEN: ${{ secrets.CI_BOT_TOKEN }}
run: |
git remote add bot-fork https://${USERNAME}:${TOKEN}@github.com/highlander-ci-bot/charts.git
git push bot-fork HEAD:${{github.event.inputs.new_operator_version}}-${{env.TIMESTAMP}}
- name: Create PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{secrets.CI_BOT_TOKEN}}
script: |
github.pulls.create({
owner: 'rancher',
repo: 'charts',
head: 'highlander-ci-bot:${{github.event.inputs.new_eks_operator}}-${{env.TIMESTAMP}}',
base: ${{github.event.inputs.charts_ref}},
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}\n\nChangelog: https://github.com/rancher/${{github.event.inputs.operator_path}}/releases/tag/v${{github.event.inputs.new_operator_version}}\n\ncc @rancher/highlander'
})