Skip to content

Update Webhook docs #3656

Update Webhook docs

Update Webhook docs #3656

name: CI test report
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- '!docs/**'
build:
runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.code == 'true'
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
# Disabling shallow clones is recommended for improving the relevancy of reporting
fetch-depth: 0
- name: Set up Go
uses: ./.github/actions/setup-go-kpt
with:
install-kpt: "false"
- name: Run unit tests to generate coverage report
id: test
run: make test
- name: Archive test results
if: steps.test.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ./coverage.out
- name: Save PR number to file
if: github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Archive PR number
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: PR_NUMBER
path: PR_NUMBER.txt
test-summary:
name: Test Summary
if: always()
needs: [check-changes, build]
runs-on: ubuntu-latest
steps:
- run: exit 1
if: |
needs.check-changes.outputs.code == 'true' &&
(needs.build.result == 'failure' || needs.build.result == 'cancelled')
- run: echo "Tests passed or skipped"