Skip to content

feat: Added CI-PRE-CHECKER for VENDOR_PRODUCT #1

feat: Added CI-PRE-CHECKER for VENDOR_PRODUCT

feat: Added CI-PRE-CHECKER for VENDOR_PRODUCT #1

Workflow file for this run

name: checkers-action
on:
push:
paths:
- 'cve_bin_tool/checkers/**'
pull_request:
paths:
- 'cve_bin_tool/checkers/**'
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
echo "yesterday=$(/bin/date -d "-1 day" -u "+%Y%m%d")" >> $GITHUB_OUTPUT
- name: Print Cache Keys
run: |
echo "Today's Cache Key: Linux-cve-bin-tool-${{ steps.get-date.outputs.date }}"
echo "Yesterday's Cache Key: Linux-cve-bin-tool-${{ steps.get-date.outputs.yesterday }}"
- name: Get today's cached database
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
id: todays-cache
with:
path: cache
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.date }}
- name: Get yesterday's cached database if today's is not available
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
if: steps.todays-cache.outputs.cache-hit != 'true'
with:
path: cache
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.yesterday }}
- name: Get changed files
id: changed-files
uses: jitterbit/get-changed-files@v1
- name: Run Python script
run: |
for file in ${{ steps.changed-files.outputs.added_modified }}; do
python cve_bin_tool/ci_pre_checker.py "$file"
done
shell: bash