verify-conformance #18801
This file contains hidden or 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: verify-conformance | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| - cron: '0 * * * *' | |
| # NOTE: docs available at | |
| # https://github.com/kubernetes-sigs/verify-conformance/blob/main/docs/maintainance.md#deployment | |
| # TODO(BobyMCbobs): auto update image, but don't use latest tag | |
| # Authentication uses a GitHub App (GH_APP_ID + GH_APP_PRIVATE_KEY + GH_APP_HMAC); | |
| # default GITHUB_TOKEN is unused. No checkout step. | |
| permissions: {} | |
| jobs: | |
| verify-conformance: | |
| if: ${{ github.repository == 'cncf/k8s-conformance' }} | |
| env: | |
| IMAGE: gcr.io/k8s-staging-apisnoop/verify-conformance@sha256:9b83ebc4d8a59c5c78738bf8dbb5819ca55ef3f2f4a7f6c90028cfbedd832baa | |
| 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 }} | |
| run: | | |
| set -x | |
| docker run --rm \ | |
| -v "$PWD:$PWD:ro" \ | |
| --workdir "$PWD" \ | |
| "${{ env.IMAGE }}" \ | |
| --github-endpoint=https://api.github.com \ | |
| --dry-run=false \ | |
| --github-app-id="${{ env.GH_APP_ID }}" \ | |
| --github-app-private-key-path="$PWD/tmp/github-app-private-key" \ | |
| --hmac-secret-file=$PWD/tmp/hmac \ | |
| --repo="$REPO" | |
| - name: cleanup | |
| if: ${{ always() }} | |
| run: | | |
| rm -rf ./tmp/ |