Skip to content

verify-conformance #848

verify-conformance

verify-conformance #848

on:
workflow_dispatch: {}
schedule:
- cron: '0 * * * *'
pull_request:
types: [opened, reopened]
# NOTE: docs available at
# https://github.com/cncf-infra/verify-conformance/blob/main/docs/maintainance.md#deployment
jobs:
verify-conformance:
runs-on: ubuntu-latest
steps:
- name: write-config
env:
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
GH_APP_ID: ${{ secrets.GH_APP_ID }}
GH_APP_HMAC: ${{ secrets.GH_APP_HMAC }}
run: |
mkdir -p ./tmp/
echo '${{ env.GH_APP_PRIVATE_KEY }}' | base64 -d > ./tmp/github-app-private-key
echo '${{ env.GH_APP_HMAC }}' > ./tmp/hmac
- name: verify-conformance
env:
GH_APP_ID: ${{ secrets.GH_APP_ID }}
REPO: ${{ github.repository }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_EVENT_PATH: ${{ github.event_path }}
run: |
set -x
EXTRA_ARGS=""
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
EXTRA_ARGS="--pr-event-json-path=$GITHUB_EVENT_PATH"
fi
docker run --rm \
-v "$PWD:$PWD:ro" \
-v "$RUNNER_TEMP:$RUNNER_TEMP:ro" \
--workdir "$PWD" \
ghcr.io/cncf-infra/verify-conformance:latest \
--github-endpoint=https://api.github.com \
--dry-run=false \
--github-app-id="$GH_APP_ID" \
--github-app-private-key-path="$PWD/tmp/github-app-private-key" \
--hmac-secret-file=$PWD/tmp/hmac \
--repo="$REPO" \
$EXTRA_ARGS
- name: cleanup
if: ${{ always() }}
run: |
rm -rf ./tmp/