Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: trivy fails on scheduled jobs #1081

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Checkout code
if: github.event_name == 'schedule' && github.event.schedule == '0 23 * * '
if: github.event_name == 'schedule' && github.event.schedule == '0 23 * * *'
uses: actions/checkout@v4
with:
ref: maint-25.02 # tmp branch
- name: Checkout code
if: github.event_name == 'schedule' && github.event.schedule == '0 0 * * '
if: github.event_name == 'schedule' && github.event.schedule == '0 0 * * *'
uses: actions/checkout@v4
with:
ref: main
Expand Down Expand Up @@ -74,6 +74,18 @@ jobs:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Checkout code
if: github.event_name == 'schedule' && github.event.schedule == '0 23 * * *'
uses: actions/checkout@v4
with:
ref: maint-25.02 # tmp branch
- name: Checkout code
if: github.event_name == 'schedule' && github.event.schedule == '0 0 * * *'
uses: actions/checkout@v4
with:
ref: main

- name: Checkout code
if: github.event_name != 'schedule'
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
Expand All @@ -98,6 +110,18 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
if: github.event_name == 'schedule' && github.event.schedule == '0 23 * * *'
uses: actions/checkout@v4
with:
ref: maint-25.02 # tmp branch
- name: Checkout code
if: github.event_name == 'schedule' && github.event.schedule == '0 0 * * *'
uses: actions/checkout@v4
with:
ref: main

- name: Checkout code
if: github.event_name != 'schedule'
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
Expand Down