-
Notifications
You must be signed in to change notification settings - Fork 59
48 lines (40 loc) · 1.35 KB
/
scan.yml
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
name: Scan
on:
workflow_dispatch:
inputs:
supported_releases_number:
description: 'Number of supported releases'
type: number
default: 1
schedule:
# run every day at 3:07am UTC
- cron: '7 3 * * *'
permissions:
security-events: write
env:
SUPPORTED_RELEASES_NUMBER: '1'
# comma separated list of images, without tag
IMAGES: "xpkg.upbound.io/upbound/provider-terraform"
jobs:
setup-vars:
runs-on: ubuntu-22.04
outputs:
supported_releases_number: ${{ steps.setup.outputs.supported_releases_number }}
images: ${{ steps.setup.outputs.images }}
steps:
- name: Setup outputs
shell: bash
id: setup
run: |
supported_releases_number="${{ fromJSON(inputs.supported_releases_number || env.SUPPORTED_RELEASES_NUMBER) }}"
echo "supported_releases_number=${supported_releases_number}" >> $GITHUB_OUTPUT
images="${{ env.IMAGES }}"
echo "images=${images}" >> $GITHUB_OUTPUT
echo "We are going to scan the last ${supported_releases_number} releases for: ${images}"
scan:
uses: upbound/official-providers-ci/.github/workflows/scan.yml@main
needs:
- setup-vars
with:
images: ${{ needs.setup-vars.outputs.images }}
supported_releases: ${{ fromJSON(needs.setup-vars.outputs.supported_releases_number) }}