Update Charts #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Charts | |
on: | |
workflow_dispatch: | |
inputs: | |
chart: | |
type: choice | |
description: Choose a chart for update. | |
options: | |
- robot-operator | |
- devspace-operator | |
- fleet-operator | |
- connection-hub-operator | |
version: | |
type: string | |
required: true | |
description: 'App version of the chart.' | |
chartDir: | |
type: string | |
required: true | |
default: "hack/deploy/chart/" | |
description: 'Chart directory.' | |
env: | |
CHARTS_DIR: ./charts/ | |
TEMP_DIR: ./tmp/repositories/ | |
permissions: | |
contents: write | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Update chart | |
run: | | |
set -eux; | |
rm -rf ${{ env.CHARTS_DIR }}${{ github.event.inputs.chart }}; | |
mkdir -p ${{ env.TEMP_DIR }}; | |
git clone --branch ${{ github.event.inputs.version }} https://github.com/robolaunch/${{ github.event.inputs.chart }}.git ${{ env.TEMP_DIR }}${{ github.event.inputs.chart }}; | |
cp -r ${{ env.TEMP_DIR }}${{ github.event.inputs.chart }}/${{ github.event.inputs.chartDir }}${{ github.event.inputs.chart }} ${{ env.CHARTS_DIR }}; | |
rm -rf ./tmp; | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "bump(charts): bump ${{ github.event.inputs.chart }} chart to ${{ github.event.inputs.version }}" |