-
Notifications
You must be signed in to change notification settings - Fork 97
51 lines (45 loc) · 1.52 KB
/
meta.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
---
name: meta
env:
GH_TOKEN: ${{ github.token }}
on:
pull_request:
push:
jobs:
trigger_workflow:
name: trigger workflow based on changed files
runs-on: ubuntu-22.04
outputs:
container_any_changed: ${{ steps.changed_files_yaml.outputs.container_any_changed }}
image_any_changed: ${{ steps.changed_files_yaml.outputs.image_any_changed }}
steps:
- uses: actions/checkout@v3
with:
# fetch full history to be able to gather changed files in all new commits
fetch-depth: 0
- uses: tj-actions/changed-files@v37
if: ${{ github.ref_type != 'tag' }}
id: changed_files_yaml
with:
files_yaml: |
container:
- '.github/workflows/build-container.yml'
- 'Dockerfile'
- 'container.gitconfig'
- 'utils.sh'
image:
- 'CMakeLists.txt'
- 'main/**'
- 'partitions_willow.csv'
- 'sdkconfig.willow'
- 'spiffs/**'
build_container:
if: ${{ needs.trigger_workflow.outputs.container_any_changed == 'true' || github.ref_type == 'tag' }}
uses: ./.github/workflows/build-container.yml
needs: trigger_workflow
build_willow:
if: ${{ needs.trigger_workflow.outputs.container_any_changed == 'false' && needs.trigger_workflow.outputs.image_any_changed == 'true' }}
uses: ./.github/workflows/build-willow.yml
needs: trigger_workflow
with:
container-image: ghcr.io/toverainc/willow:main