Skip to content

chore: update go version on documentation validation #515

chore: update go version on documentation validation

chore: update go version on documentation validation #515

name: Validate GitHub workflows
on:
pull_request:
paths:
- '.github/workflows/*.yaml'
workflow_dispatch: {}
permissions: {}
jobs:
validate:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Validate YAML
run: |
set +e
# Run yamllint and capture output
docker run --rm -v "$PWD:/data" -w /data \
gsoci.azurecr.io/giantswarm/yamllint:1.37.1 \
--format=parsable . > yamllint-output.txt 2>&1
exit_code=$?
# Write summary only if there are failures
if [ $exit_code -ne 0 ]; then
echo "## YAML Validation Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "❌ Found issues in the following files:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Extract and format only lines with errors
if [ -s yamllint-output.txt ]; then
echo '```' >> $GITHUB_STEP_SUMMARY
grep '\[error\]' yamllint-output.txt >> $GITHUB_STEP_SUMMARY || echo "No errors found in output" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi
fi
# Clean up
rm -f yamllint-output.txt
# Exit with the original exit code
exit $exit_code
- name: Validate GitHub Actions
uses: jazzsequence/github-action-validator@863579565c8771e1d64646e44ad5ff4884eac85f # v1.0.5
with:
show-ascii-art: false
path-to-workflows: '.github/workflows/*.yaml'