-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
83 lines (78 loc) · 2.5 KB
/
action.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Wait for GitHub
description: Wait for things to happen on GitHub
inputs:
token:
description: "GitHub token"
required: false
default: ${{ github.token }}
app-id:
description: "GitHub App ID"
required: false
app-installation-id:
description: "GitHub App installation ID"
required: false
app-private-key:
description: "GitHub App private key"
required: false
timeout:
description: "Timeout in golang duration format"
required: false
default: 5m
interval:
description: "Recheck interval (poll this often) in golang duration format"
required: false
default: 30s
wait-for:
description: 'What to wait for. Valid values: "ci" (wait for CI to finish), "pr" (wait for PR to be merged)'
required: true
owner:
description: "GitHub repo owner"
required: false
default: ${{ github.repository_owner }}
repo:
description: "GitHub repo name"
required: false
default: ${{ github.event.repository.name }}
ref:
description: "Git ref to check"
required: true
checks-to-wait-for:
description: 'The comma-separated names of the checks to wait for. Only used when wait-for is "ci"'
required: false
runs:
using: composite
steps:
- name: Check repository out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
env:
action_repo: ${{ github.action_repository }}
action_ref: ${{ github.action_ref }}
with:
path: ${{ github.workspace }}/action-checkout
repository: ${{ env.action_repo }}
ref: ${{ env.action_ref }}
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: ${{ github.workspace }}/action-checkout/go.mod
- name: Run
shell: sh
env:
GITHUB_TOKEN: ${{ inputs.token }}
GITHUB_CI_CHECKS: ${{ inputs.checks-to-wait-for }}
GITHUB_APP_ID: ${{ inputs.app-id }}
GITHUB_APP_INSTALLATION_ID: ${{ inputs.app-installation-id }}
GITHUB_APP_PRIVATE_KEY: ${{ inputs.app-private-key }}
run: |
cd "${{ github.workspace }}/action-checkout"
go run github.com/grafana/wait-for-github/cmd/wait-for-github \
--log-level \
debug \
--timeout \
${{ inputs.timeout }} \
--recheck-interval \
${{ inputs.interval }} \
${{ inputs.wait-for }} \
${{ inputs.owner }} \
${{ inputs.repo }} \
${{ inputs.ref }}