-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.69 KB
/
update-charts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 }}"