Skip to content

UpdateHelmValue

UpdateHelmValue #37

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)
export app_version="$(cat charts/agh2/Chart.yaml | grep -e '^version:' | awk '{print $2}' | xargs semver bump patch)"
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: Create PR
uses: peter-evans/create-pull-request@v4
with:
branch: build/auto-update-tags
branch-suffix: short-commit-hash
commit-message: |
auto-build: values.yaml update
title: "auto-build: values.yaml update"
body: |
[AUTOMATED UPDATE]