Skip to content

Add cilium v1.15.12@1f74fa42d94cdb6a57307b70ea2bb91a99379f1f ⎈ #107

Add cilium v1.15.12@1f74fa42d94cdb6a57307b70ea2bb91a99379f1f ⎈

Add cilium v1.15.12@1f74fa42d94cdb6a57307b70ea2bb91a99379f1f ⎈ #107

name: Validate Cilium Helm chart
on:
pull_request: {}
push:
branches:
- master
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
persist-credentials: false
- name: Set up job variables
id: vars
run: |
# Get last commit message
readonly local last_commit_log=$(git log -1 --grep "^Add cilium" --pretty=format:"%s")
echo "last commit log: $last_commit_log"
readonly local chart_version=$(echo "$last_commit_log" | grep -Eo "Add cilium v[^@]+" | sed 's/Add\ cilium\ v//' )
echo "Helm chart detected version: '${chart_version}'"
if [[ -n "${chart_version}" ]]; then
if [ "${{ github.event_name }}" = "pull_request" ] ; then
# Use the local chart file for pull requests.
echo "chartPath=cilium-${chart_version}.tgz" >> $GITHUB_OUTPUT
else
# Download the chart from the Helm repository on push.
helm repo add cilium https://helm.cilium.io
helm repo update
mkdir tmp
until helm pull cilium/cilium -d tmp --version "${chart_version}"
do
echo "helm pull failed. Retrying..."
sleep 1
helm repo update
done
echo "chartPath=tmp/cilium-${chart_version}.tgz" >> $GITHUB_OUTPUT
fi
fi
- name: Validate Helm chart
if: ${{ steps.vars.outputs.chartPath != '' }}
run: |
./validate_helm_chart.sh ${{ steps.vars.outputs.chartPath }}