Skip to content

chore: Add CODEOWNERS and repo.yml #3

chore: Add CODEOWNERS and repo.yml

chore: Add CODEOWNERS and repo.yml #3

name: global checks
on: pull_request
jobs:
global_checks:
runs-on: ubuntu-latest
steps:
- name: Check out target repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check out workflow tooling repository
uses: actions/checkout@v4
with:
repository: devrev/jano-gh-workflow
path: .global-checks-tooling
- name: Load python requirements.
run: |
pip install strictyaml
- name: Check that there is a CODEOWNERS file
run: |
echo "Check whether the repo has a .github/CODEOWNERS file"
python .global-checks-tooling/checks/check_codeowners.py
- name: Check that there is a valid repo.yml file
run: |
echo "Check whether the repo has a valid .devrev/repo.yml file"
python .global-checks-tooling/checks/check_repo_yml.py
- name: Check that the committers are from devrev.ai
run: |
echo "Get the email addresses of the committers"
git log --format='%ae' ${{github.event.pull_request.base.sha}}..${{github.event.pull_request.head.sha}} > .global-checks-tooling/committers.txt
echo "Check whether the committer emails are @devrev.ai"
python .global-checks-tooling/checks/check_commit_emails.py
- name: Run trufflehog
run: |
BASE=${{github.event.pull_request.base.sha}}
HEAD=${{github.event.pull_request.head.sha}}
docker run --rm -v .:/tmp -w /tmp \
ghcr.io/trufflesecurity/trufflehog:latest \
git file:///tmp/ \
--since-commit \
${BASE:-''} \
--branch \
${HEAD:-''} \
--fail \
--no-update \
--json > .global-checks-tooling/trufflehog.json
cat .global-checks-tooling/trufflehog.json
python .global-checks-tooling/checks/check_trufflehog.py .global-checks-tooling/trufflehog.json