-
Notifications
You must be signed in to change notification settings - Fork 40
60 lines (55 loc) · 1.47 KB
/
pull-request.yaml
File metadata and controls
60 lines (55 loc) · 1.47 KB
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
53
54
55
56
57
58
59
60
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Pull Request
on:
merge_group:
pull_request:
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.changed_files }}
steps:
- name: Get changed files
uses: bjw-s-labs/action-changed-files@015416e33c709af88f84a4496f4030c1f0ef212e # v0.5.0
id: changed-files
with:
path: apps
include_only_directories: true
max_depth: 1
build:
if: ${{ needs.prepare.outputs.changed-files != '[]' }}
name: Build ${{ matrix.app }}
needs:
- prepare
uses: ./.github/workflows/app-builder.yaml
permissions:
attestations: write
contents: read
id-token: write
packages: write
secrets: inherit
strategy:
matrix:
app: ${{ fromJSON(needs.prepare.outputs.changed-files) }}
fail-fast: false
max-parallel: 4
with:
app: ${{ matrix.app }}
release: false
status:
if: ${{ !cancelled() }}
name: Build Success
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Any jobs failed?
if: ${{ contains(needs.*.result, 'failure') }}
run: |-
exit 1
- name: All jobs passed or skipped?
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: |-
echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"