-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.4 KB
/
ci-scripts.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: CI-Scripts
on:
workflow_dispatch:
push:
branches:
- 'master'
schedule:
- cron: "42 23 31 12 *"
jobs:
create-dependent-matrix:
runs-on: ubuntu-latest
name: 'Find dependent repositories'
if: ${{ github.event_name == 'push' || contains(github.event.inputs.build-dependent || false, 'true') }}
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Check list of repositories exists
id: check-file
run: test -f ./.github/dependent-repositories.txt || exit 1
- name: Create dependent build matrix
id: set-matrix
run: echo "::set-output name=matrix::`cat ./.github/dependent-repositories.txt | tr -d " \t\n\r"`"
build-dependent:
needs: [create-dependent-matrix]
runs-on: ubuntu-latest
name: 'Build dependent'
if: ${{ contains(needs.create-dependent-matrix.outputs.matrix, '/') }}
strategy:
matrix: ${{fromJson(needs.create-dependent-matrix.outputs.matrix)}}
steps:
- name: Start ${{ matrix.repository }} build
uses: benc-uk/[email protected]
with:
workflow: Nightly
repo: ${{ matrix.repository }}
ref: ${{ matrix.branch }}
token: ${{ secrets.WORKFLOW_ACCESS_TOKEN }}
inputs: '{ "build-dependent": "${{ matrix.build-dependent }}" }'