Skip to content

feat(deps): update helm release haproxy to v2.2.10 #256

feat(deps): update helm release haproxy to v2.2.10

feat(deps): update helm release haproxy to v2.2.10 #256

Workflow file for this run

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 event is a PR event
# - true if the commit is not associated with any PR by checking the committer name is GitHub or not
# - the committer name is GitHub when the commit is merged to the base branch from a PR in the UI
# 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
pre-check:
runs-on: ubuntu-latest
outputs:
proceed_workflow: ${{ steps.check-commit.outputs.result }}
steps:
- uses: actions/github-script@v7
id: check-commit
with:
script: |
if (context.eventName === 'pull_request') {
return true;
}
const commit = await github.rest.repos.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
});
const isCommitterGitHub = commit.data.commit.committer?.name === 'GitHub';
return isCommitterGitHub ? false : true;
result-encoding: string
lint-test:
needs: pre-check
if: needs.pre-check.outputs.proceed_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@v4
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: |
for chart in ${{ steps.list-changed.outputs.charts }}; do
helm dependency update $chart
done
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