Skip to content

reusable workflows

reusable workflows #11

Workflow file for this run

name: reusable workflows
on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'charts/**'
workflow_dispatch:
inputs:
Message:
description: 'Message for manually triggering'
required: false
default: 'Triggered for Updates'
type: string
IGNORE_CHARTS:
description: 'Ignore linting for list of charts separated by pipe(|)'
required: false
default: 'reporting|reporting-init|activemq-artemis'
type: string
CHART_PUBLISH:
description: 'Chart publishing to gh-pages branch'
required: false
default: 'OFF'
type: string
push:
branches:
- '!release-branch'
- master
- 1.*
- develop
- MOSIP*
- release*
paths:
- 'charts/**'
env:
IGNORE_CHARTS: "reporting|reporting-init|activemq-artemis"
CHART_PUBLISH: "ON"
jobs:
lint-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Disable Chart publish, for pull requests
run: |
echo "CHART_PUBLISH=OFF" >> $GITHUB_ENV
if: "${{ github.event_name == 'pull_request' }}"
- name: Publish Helm charts
uses: syedsalman3753/syed-helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: charts
ignore_charts: "${{ inputs.IGNORE_CHARTS || env.IGNORE_CHARTS }}"
chart_publish: "${{ inputs.CHART_PUBLISH || env.CHART_PUBLISH }}"
# Commented below tasks as it cannot test MOSIP helm/charts deployment due to dependencies issues
#- name: Create kind v1.21.1 cluster
# uses: helm/[email protected]
# with:
# node_image: kindest/node:v1.21.1
#
#- name: Run chart-testing (install)
# run: |
# while read -r chart; do
# echo -e "\nCHART: $chart\n";
# ct install --config=.github/chart-testing-config.yaml --charts=$chart --remote=target_repo --target-branch=$TARGET_BRANCH;
# done < ./list.txt