Skip to content

ci(secret): updated workflow 5 #35

ci(secret): updated workflow 5

ci(secret): updated workflow 5 #35

name: Validate Secrets
on:
push:
branches:
- '**' # Run on all branches
jobs:
validate-secrets:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'node' # Use the latest Node.js version
- name: Get Changed Files
id: changed-files
run: |
git diff --name-only HEAD~1 HEAD > changed_files.txt || git diff --name-only HEAD > changed_files.txt
cat changed_files.txt
- name: Validate Secrets in Changed Files
run: |
while read file; do
if [ -f "$file" ]; then
echo "Scanning $file"
node helper/workflow-secret-check "$file"
fi
done < changed_files.txt