-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (47 loc) · 1.38 KB
/
nightly.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
49
50
51
52
# This workflow runs nighly builds for each package. Jobs don't run concurrently
# to avoid performance issues on remote builders and also having a huge queue
# in the pipeline. That's why each job depends on each other through "needs".
name: nightly
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 0' # every sunday at 1am
env:
DISABLED_PACKAGES: scan,sbom
jobs:
prepare:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.projects.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Create matrix
id: projects
run: |
projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ')
projects=$(echo $projects | jq -cR --arg exclude "${{ env.DISABLED_PACKAGES }}" 'split(" ") | map(select(. | IN($exclude | split(",")) | not))')
echo "matrix=$projects" >>${GITHUB_OUTPUT}
-
name: Show matrix
run: |
echo ${{ steps.projects.outputs.matrix }}
build:
uses: ./.github/workflows/.release.yml
needs:
- prepare
strategy:
fail-fast: false
max-parallel: 1
matrix:
project: ${{ fromJson(needs.prepare.outputs.matrix) }}
with:
name: ${{ matrix.project }}
envs: |
NIGHTLY_BUILD=1
secrets: inherit