forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.27 KB
/
ariane-scheduled.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
42
43
44
45
46
47
name: Ariane scheduled workflows
on:
# Run every 6 hours
schedule:
- cron: '0 */6 * * *'
permissions:
# To be able to access the repository with actions/checkout
contents: read
# To trigger workflows via workflow_dispatch
actions: write
jobs:
ariane-scheduled:
name: Run Scheduled Workflows
strategy:
fail-fast: false
matrix:
branch:
- "1.12"
- "1.13"
- "1.14"
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: v${{ matrix.branch }}
persist-credentials: false
- name: Manually run Ariane workflows from the branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REF="v${{ matrix.branch }}"
SHA=$(git rev-parse ${REF})
readarray workflows < <(yq '.triggers["/test-backport-${{ matrix.branch }}"].workflows[]' .github/ariane-config.yaml)
for workflow in ${workflows[@]}; do
echo triggering ${workflow}
gh workflow run ${workflow} \
--ref ${REF} \
-f PR-number=${REF/./-} \
-f context-ref=${REF} \
-f SHA=${SHA}
done