validate annotations for namespaces from PRs targeting the main branch #11
This file contains 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: Annotations Checker | |
on: | |
pull_request: | |
branches: | |
- main | |
- annotations-checker | |
jobs: | |
validate-annotations: | |
name: Validate Annotations | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Build Docker image | |
run: docker build -t annotations-checker -f cmd/annotations-checker/Dockerfile . | |
- uses: actions/github-script@v7 | |
name: Get Diff Url | |
id: get-diff-url | |
with: | |
script: | | |
echo "DIFF_URL=${context.payload.pull_request.diff_url}" >> $GITHUB_OUTPUT | |
- name: Run Validation in Docker Container | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: docker run --rm -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} -e DIFF_URL=${{ steps.get-diff-url.outputs.DIFF_URL }} annotations-checker |