Update scan-simples.yml #6
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: scan-simples | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
scan: | |
name: scan-simples | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
path: 'pisc-2024' | |
- name: Set project directory | |
run: | | |
PROJECT_DIR=$(find pisc-2024 -mindepth 2 -maxdepth 2 -type d -name "day-*" | head -n 1) | |
echo "Project directory: $PROJECT_DIR" | |
echo "::set-env name=PROJECT_DIR::$PROJECT_DIR" | |
- name: Navigate to project directory | |
run: cd ${{ env.PROJECT_DIR }} | |
- name: Install dependencies | |
run: npm install | |
- name: Trivy Scan | |
uses: aquasecurity/trivy-action@master | |
with: | |
scan-type: 'fs' | |
scan-ref: '.' | |
exit-code: 1 | |
ignore-unfixed: true |