Skip to content

Commit

Permalink
chore: add workflow to replace vcluster chart version
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesfrey committed Jan 24, 2025
1 parent 77ae2b0 commit 5a5afe7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/bump-vcluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: bump-vcluster

on:
workflow_dispatch:
inputs:
version:
required: true
type: string

jobs:
bump-vcluster-chart:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Replace vcluster chart version
env:
VCLUSTER_RELEASE_VERSION: ${{ github.event.inputs.version }}
run: |
# Replace the old vcluster chart release with the new one in all relevant files
sed -i "s/\${\(CHART_VERSION:=\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)}/\${\1${VCLUSTER_RELEASE_VERSION#v}}/" README.md templates/cluster-template.yaml
sed -i "s/\(CHART_VERSION=\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)/\1${VCLUSTER_RELEASE_VERSION#v}/" README.md .github/workflows/e2e.yaml
sed -i "s/\([ ]*Version: \"\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\"/\1${VCLUSTER_RELEASE_VERSION#v}\"/" test/controllerstest/controllers_suite_test.go
- name: Create pull request
env:
VCLUSTER_RELEASE_VERSION: ${{ github.event.inputs.version }}
uses: peter-evans/create-pull-request@v7
with:
# TODO: Replace GITHUB_TOKEN with PAT with correct permissions
token: ${{ secrets.GITHUB_TOKEN }}
committer: Loft Bot <loft-bot@users.noreply.github.com>
branch: bump-vcluster
commit-message: "chore: bump vcluster chart to ${{ env.VCLUSTER_RELEASE_VERSION }}"
title: "chore: bump vcluster chart to ${{ env.VCLUSTER_RELEASE_VERSION }}"
body: Triggered by ${{ github.repository }}@${{ github.sha }}
signoff: true
delete-branch: true

0 comments on commit 5a5afe7

Please sign in to comment.