Improve initContainers template in common chart #367
Workflow file for this run
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: Linting & Integration tests | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3.3 | |
with: | |
version: v3.8.1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.3.1 | |
- name: Install additional Helm repos | |
run: | | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=$(echo "$changed" | tr '\n' ',' | sed 's/,$/\n/')" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: | | |
ct lint \ | |
--target-branch ${{ github.event.repository.default_branch }} \ | |
--lint-conf chart-testing/lintconf.yaml \ | |
--charts ${{ steps.list-changed.outputs.changed }} | |
if: steps.list-changed.outputs.changed | |
- name: Create kind cluster | |
uses: helm/kind-action@v1.4.0 | |
with: | |
node_image: kindest/node:v1.21.10 | |
if: steps.list-changed.outputs.changed | |
- name: Replace secrets in Helm charts | |
env: | |
# TODO: rename the secret to avoid confusion | |
SMF_CONFIG_MATRIX_ACCESS_TOKEN: ${{ secrets.SMF_BOT_MATRIX_ACCESS_TOKEN }} | |
STAKING_MINER_CONFIG_SEED: ${{ secrets.STAKING_MINER_CONFIG_SEED }} | |
run: | | |
shopt -s globstar | |
for f in $(find **/ci/*-values.yaml); do | |
sed -i "s/__GITHUB_SECRET_SMF_CONFIG_MATRIX_ACCESS_TOKEN/$SMF_CONFIG_MATRIX_ACCESS_TOKEN/g" $f | |
sed -i "s/__GITHUB_SECRET_STAKING_MINER_CONFIG_SEED/$STAKING_MINER_CONFIG_SEED/g" $f | |
done | |
if: steps.list-changed.outputs.changed | |
- name: Run chart-testing (install) | |
run: | | |
ct install \ | |
--target-branch ${{ github.event.repository.default_branch }} \ | |
--charts ${{ steps.list-changed.outputs.changed }} | |
if: steps.list-changed.outputs.changed |