Bump actions/checkout from 4.2.0 to 4.2.1 #68
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: 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
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 }} |