-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.06 KB
/
trigger.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
name: Build Trigger
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
branches:
- main
paths:
- ".github/workflows/trigger.yml"
- "./templates/*"
schedule:
- cron: "0 0 */1 * *"
jobs:
init:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: List templates
id: templates-list
run: |
sudo apt-get install -y jq
echo TEMPLATES_LIST="$(ls templates/*|jq -Rsc 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
outputs:
templates_list: ${{steps.templates-list.outputs.TEMPLATES_LIST}}
image-build:
needs: init
strategy:
matrix:
templates: ${{ fromJson(needs.init.outputs.templates_list) }}
uses: ./.github/workflows/builder.yml
with:
config_path: ${{matrix.templates}}
branch_name: ${{github.event.pull_request.base.ref}}
is_merged: ${{github.event.pull_request.merged || github.event_name == 'schedule'}}
secrets: inherit