-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.13 KB
/
daily-scan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Daily scan
on:
schedule:
- cron: '0 0 * * 1-5'
workflow_dispatch:
permissions:
contents: read
attestations: write
id-token: write
security-events: write
actions: read
jobs:
scan:
name: Scan image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch tags
shell: bash
run: git fetch --tags origin
- name: Get previous tag
id: previous-tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Format version
id: version
shell: bash
run: |
TAG=${{ steps.previous-tag.outputs.tag }}
VERSION=${TAG#v}
echo "VERSION: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Get GitHub vars
id: github
uses: ./.github/actions/github
- name: Scan vulnerabilities
id: scan
uses: ./.github/actions/scan
with:
source: 'ghcr.io/${{ steps.github.outputs.repository }}:${{ steps.version.outputs.version }}'
fail-on: high
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}