Skip to content

Bump actions/checkout from 3 to 4 #87

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #87

Workflow file for this run

name: ci-apps-kpt
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
- 'docs/**'
- '.github/workflows/ci-apps-gator.yaml'
- '.github/workflows/ci-policies.yaml'
pull_request:
paths-ignore:
- '**/README.md'
- 'docs/**'
- '.github/workflows/ci-apps-gator.yaml'
- '.github/workflows/ci-policies.yaml'
jobs:
kpt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install kpt
run: |
curl -L https://github.com/GoogleContainerTools/kpt/releases/download/v${KPT_VERSION}/kpt_linux_amd64 > kpt
chmod +x kpt
env:
KPT_VERSION: 1.0.0-beta.32
- name: gatekeeper
id: gatekeeper
run: |
./kpt fn eval . --image gcr.io/kpt-fn/gatekeeper:v0.2 --results-dir tmp
- name: gatkeeper errors in summary
if: ${{ failure() && steps.gatekeeper.outcome == 'failure' }}
run: |
if [ -f tmp/results.yaml ]; then
echo "❌ gatekeeper errors:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat tmp/results.yaml | yq -r '.items[]?.results' -o json | jq -r '.[]? | "➡️ \(.message)"' | sed 's/<//g;s/>//g' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
rm tmp/results.yaml
fi