diff --git a/.github/workflows/helm-charts.yaml b/.github/workflows/helm-charts.yaml new file mode 100644 index 00000000..7773d5f7 --- /dev/null +++ b/.github/workflows/helm-charts.yaml @@ -0,0 +1,34 @@ +on: + release: + types: [published] +name: "Publish Helm Charts" +jobs: + helm: + name: Package and Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Install yq" + run: | + sudo snap install yq + - name: Parse Tag + run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/} + - name: "Publish Helm Chart" + env: + HELM_REGISTRY: https://charts.securecodebox.io + USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }} + PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }} + run: | + # Publish charts in all folders containing a `Chart.yaml` file + # https://github.com/koalaman/shellcheck/wiki/SC2044 + find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do + ( + dir="$(dirname "${chart}")" + cd "${dir}" || exit + echo "Processing Chart in $dir" + helm lint . + helm package --version $RELEASE_VERSION . + NAME=$(yq read - name < Chart.yaml) + curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts" + ) + done \ No newline at end of file diff --git a/demo-apps/bodgeit/Chart.yaml b/demo-apps/bodgeit/Chart.yaml index b31df8ec..2c8173c8 100644 --- a/demo-apps/bodgeit/Chart.yaml +++ b/demo-apps/bodgeit/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 version: 0.1.0 type: application -appVersion: "latest" +appVersion: "v1.4.0" name: bodgeit description: "The BodgeIt Store is a vulnerable web app which is aimed at people who are new to pen testing" home: https://github.com/psiinon/bodgeit diff --git a/demo-apps/juice-shop/Chart.yaml b/demo-apps/juice-shop/Chart.yaml index eb4e4e89..2515627a 100644 --- a/demo-apps/juice-shop/Chart.yaml +++ b/demo-apps/juice-shop/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 version: 0.1.0 -appVersion: "v10.0.0" +appVersion: "v11.1.2" name: juice-shop description: "OWASP Juice Shop: Probably the most modern and sophisticated insecure web application" type: application