diff --git a/.github/workflows/validate_codeowners.yml b/.github/workflows/validate_codeowners.yml new file mode 100644 index 0000000..db4b495 --- /dev/null +++ b/.github/workflows/validate_codeowners.yml @@ -0,0 +1,35 @@ +name: Validate CODEOWNERS + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + validate-codeowners: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Docker login + uses: docker/login-action@v2 + with: + registry: ezcater-production.jfrog.io + username: ${{ secrets.ARTIFACTORY_USERNAME }} + password: ${{ secrets.ARTIFACTORY_PASSWORD }} + + - name: Pull validator image + run: docker pull ezcater-production.jfrog.io/codeowners-validator + + - name: Run validator + run: | + docker run --rm \ + -v ${PWD}:${PWD} \ + ezcater-production.jfrog.io/codeowners-validator \ + validate ${PWD}