Scan Antrea Docker image for vulnerabilities every day #813
Workflow file for this run
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 Antrea Docker image for vulnerabilities every day | |
on: | |
schedule: | |
# every day at 10am | |
- cron: '0 10 * * *' | |
jobs: | |
build: | |
if: github.repository == 'antrea-io/antrea' | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.17 | |
- name: Scan Antrea Docker image for vulnerabilities | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_SES }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_SES }} | |
run: | | |
mkdir clair-reports | |
./ci/clair-scan/run.sh ./clair-reports | |
- name: Upload Clair scan reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: clair-scan-reports | |
path: clair-reports/*.json | |
retention-days: 90 # max value | |
skip: | |
if: github.repository != 'antrea-io/antrea' | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Skip | |
run: | | |
echo "Skipping image scan because workflow cannot be run from fork" |