Skip to content

✨ 新增身份验证器 #3

✨ 新增身份验证器

✨ 新增身份验证器 #3

name: Check for env theft
on:
pull_request:
branches:
- '**'
jobs:
check-process-env:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch target branch
run: |
git fetch origin ${{ github.base_ref }}
- name: Search for process.env in diff
run: |
if git diff --name-only --diff-filter=AM origin/${{ github.base_ref }} | xargs grep -E "process.env"; then
echo "Found process.env in changed files, check failed!"
exit 1
else
echo "No process.env found in changed files, check passed!"
fi