Skip to content

fix: allow manually triggered image builds #1

fix: allow manually triggered image builds

fix: allow manually triggered image builds #1

name: Publish Helm Charts

Check failure on line 1 in .github/workflows/publish-helm-chart-manual.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-helm-chart-manual.yml

Invalid workflow file

`inputs` is not a valid event name
on:
workflow_dispatch:
inputs:
chart:
description: "The helm chart to publish"
type: choice
required: true
options: ["keycloak", "metabase", "patroni", "sysdig"]
default: "keycloak"
jobs:
build-and-push-helm:
runs-on: ubuntu-20.04
steps:
- uses: hmarr/debug-action@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.8.2
- name: Add Helm Dependencies
if: ${{ github.event.inputs.chart }} == "keycloak" || ${{ github.event.inputs.chart }} == "metabase"
run: |
helm repo add patroni https://bcgov.github.io/sso-helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
with:
charts_dir: charts/${{ github.event.inputs.chart }}
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Remove dependencies of Keycloak Helm chart
if: ${{ github.event.inputs.chart }} == "keycloak"
uses: mikefarah/yq@master
with:
cmd: yq -i 'del(.dependencies) | .version = .version + "-nodep"' ./charts/keycloak/Chart.yaml
- name: Remove requirements of Keycloak Helm chart
if: ${{ github.event.inputs.chart }} == "keycloak"
run: |
rm -rf charts || true
rm requirements.lock || true
working-directory: ./charts/keycloak
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
with:
charts_dir: charts/${{ github.event.inputs.chart }}
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: true