generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 16
65 lines (59 loc) · 1.94 KB
/
wait-build-reusable.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Backend-switching-tests-gardener (reusable)
on:
workflow_call:
inputs:
repository:
description: Full name of repository (<owner>/<name>).
required: true
type: string
git_ref:
description: Git reference against which the check will be retrieved. Could be commit SHA, tag or branch name.
required: true
type: string
git_check_run_name:
description: Name of the Git check to wait for.
required: true
type: string
interval:
description: Interval (seconds) for polling the status.
required: false
default: 60
type: number
timeout:
description: Timeout (seconds) to wait for in total.
required: false
default: 600
type: number
secrets:
github_token:
required: true
jobs:
wait-for-build-job:
name: Wait for build job
runs-on: ubuntu-latest
steps:
- name: Checkout eventing-tools
uses: actions/checkout@v4
with:
repository: 'kyma-project/eventing-tools'
path: 'kyma-project/eventing-tools'
ref: main
sparse-checkout: 'scripts/wait-for-commit-check'
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install requirements
run: |
pip install -r $GITHUB_WORKSPACE/kyma-project/eventing-tools/scripts/wait-for-commit-check/requirements.txt
- name: Wait for build job
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
REPOSITORY_FULL_NAME: ${{ inputs.repository }}
GIT_REF: "${{ inputs.git_ref }}"
GIT_CHECK_RUN_NAME: "${{ inputs.git_check_run_name }}"
INTERVAL: ${{ inputs.interval }}
TIMEOUT: ${{ inputs.timeout }}
run: |
python $GITHUB_WORKSPACE/kyma-project/eventing-tools/scripts/wait-for-commit-check/run.py