feat(deps): update helm release nginx to v19 #115
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: Lint and Test Charts | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "charts/**" | |
types: | |
- opened | |
- synchronize | |
push: | |
branches: | |
- main | |
paths: | |
- "charts/**" | |
env: | |
# make install test false for now | |
DO_INSTALL_TEST: false | |
jobs: | |
# The pre-check job determines whether the workflow should proceed based on the event type and associated PRs: | |
# - true if the commit is not associated with any PR if it is a push event | |
# - true if the event is a PR event | |
# so that, we can skip the following job if the commit is associated with a PR when it is merged to main branch | |
# - to prevent running the job twice | |
# if committer name/login is `GitHub` or `web-flow, consider it's from merged PR event | |
pre-check: | |
runs-on: ubuntu-latest | |
outputs: | |
run_workflow: ${{ steps.check-commit.outputs.result }} | |
steps: | |
- uses: actions/github-script@v7 | |
if: github.event_name == 'push' | |
id: check-commit | |
with: | |
script: | | |
const commit = await github.rest.repos.getCommit({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: context.sha | |
}); | |
return commit.committer.name !== 'GitHub' || committer.login !== 'web-flow'; | |
result-encoding: string | |
# Set default output for PR events | |
- if: github.event_name == 'pull_request' | |
id: pr-event | |
run: echo "result=true" >> $GITHUB_OUTPUT | |
lint-test: | |
needs: pre-check | |
if: needs.pre-check.outputs.run_workflow == 'true' || github.head_ref != 'release-please--branches--main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.13.0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
check-latest: true | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2 | |
- name: Install Helm Unittest plugin | |
run: | | |
helm plugin install https://github.com/helm-unittest/helm-unittest.git | |
- name: List changed charts | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
echo "charts=$(echo "$changed" | tr '\n' ' ')" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Lint charts | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --config .github/config/chart-testing.yaml | |
- name: Unit testing | |
if: steps.list-changed.outputs.changed == 'true' | |
id: unittest | |
run: | | |
helm dependency update ${{ steps.list-changed.outputs.charts }} | |
helm unittest ${{ steps.list-changed.outputs.charts }} | |
- name: Create kind cluster | |
if: ${{ steps.list-changed.outputs.changed == 'true' && env.DO_INSTALL_TEST == 'true' }} | |
uses: helm/kind-action@v1 | |
with: | |
config: .github/config/kind-cluster-config.yaml | |
- name: Install foundation packages | |
if: ${{ steps.list-changed.outputs.changed == 'true' && env.DO_INSTALL_TEST == 'true' }} | |
run: | | |
# istio | |
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.18.3 sh - | |
istio-1.18.3/bin/istioctl install --set profile=demo -y | |
# cert-manager | |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.1/cert-manager.yaml | |
# external-secrets | |
kubectl apply -f https://github.com/external-secrets/external-secrets/releases/download/v0.9.5/external-secrets.yaml | |
- name: Run chart-testing (install) | |
if: ${{ steps.list-changed.outputs.changed == 'true' && env.DO_INSTALL_TEST == 'true' }} | |
run: ct install --config .github/config/chart-testing.yaml |