UpdateHelmValue #32
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: 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 attack="${{ fromJson(github.event.inputs.version).attack }}" | |
export blender="${{ fromJson(github.event.inputs.version).blender }}" | |
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 attackfrontend="${{ fromJson(github.event.inputs.version).attack-frontend }}" | |
export matcher="${{ fromJson(github.event.inputs.version).matcher }}" | |
export template="${{ fromJson(github.event.inputs.version).template }}" | |
export transformer="${{ fromJson(github.event.inputs.version).transformer }}" | |
export checkindaemon="${{ fromJson(github.event.inputs.version).checkin-daemon }}" | |
export group="${{ fromJson(github.event.inputs.version).group }}" | |
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] |