-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.21 KB
/
on-sync.yaml
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
name: On sync
on:
push:
branches: ["main"]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
push: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
build-otelcol: ${{ steps.changed.outputs.workflows_any_changed || steps.changed.outputs.otelcol_any_changed }}
build-bird: false
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Get changed files
id: changed
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45.0.2
with:
files_yaml: |
workflows: [.github/workflows/**]
bird: [bird/**]
otelcol: [otelcol/**]
- run: echo "${{ toJSON(steps.changed.outputs) }}"
build-otelcol:
needs: [prepare]
if: needs.prepare.outputs.build-otelcol
uses: ./.github/workflows/wf-build-otelcol.yaml
with:
push: true
build-bird:
needs: [prepare]
if: needs.prepare.outputs.build-bird
uses: ./.github/workflows/wf-build-bird.yaml
with:
push: ${{ fromJSON(needs.prepare.outputs.push) }}