Skip to content

UpdateHelmValue

UpdateHelmValue #33

Workflow file for this run

name: UpdateHelmValue
on:
workflow_dispatch:
inputs:
version:
description: "version of argushack in json"
required: true
type: string
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: installl tools
run: |
sudo apt update
sudo apt install gettext-base
sudo wget -O /usr/local/bin/semver https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver
sudo chmod +x /usr/local/bin/semver
semver --version
- name: Checkout
uses: actions/checkout@v3
- name: generator values.yaml
run: |
export captain="${{ fromJson(github.event.inputs.version).captain }}"
export core="${{ fromJson(github.event.inputs.version).core }}"
export exploitmgr="${{ fromJson(github.event.inputs.version).exploitmgr }}"
export frontend="${{ fromJson(github.event.inputs.version).frontend }}"
export checkindaemon="${{ fromJson(github.event.inputs.version).checkin-daemon }}"
export reporttemplate="${{ fromJson(github.event.inputs.version).report-template }}"
export reportinit="${{ fromJson(github.event.inputs.version).report-init }}"
export reportgenerator="${{ fromJson(github.event.inputs.version).report-generator }}"
export poster="${{ fromJson(github.event.inputs.version).poster }}"
export cronjob="${{ fromJson(github.event.inputs.version).cronjob }}"
export date=$(date +%y%m%d)
envsubst < .github/workflows/values.template > "charts/agh2/values.yaml"
envsubst < .github/workflows/Chart.yaml.template > "charts/agh2/Chart.yaml"
cat charts/agh2/values.yaml
cat charts/agh2/Chart.yaml
- name: update chart version
working-directory: charts/agh2
run: |
version="$(cat Chart.yaml | grep -e '^version:' | awk '{print $2}')"
sed -i "s/$version/$(semver bump patch $version)/g" Chart.yaml
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
branch: build/auto-update-tags-${{ steps.sha.outputs.sha }}
commit-message: |
auto-build: values.yaml update
title: "auto-build: values.yaml update"
body: |
[AUTOMATED UPDATE]