-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
63 lines (63 loc) · 1.96 KB
/
Copy pathaction.yml
File metadata and controls
63 lines (63 loc) · 1.96 KB
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
name: DeployBot
description: Promote, batch, merge, and follow agent-authored pull requests
inputs:
mode:
description: Run queue reaction or release-only follow
required: false
default: react
config:
description: Repository-relative merge queue policy path
required: false
default: .mergequeue.toml
follow:
description: Advance cumulative main to the configured release-admission gate
required: false
default: "true"
dispatch_ci:
description: Dispatch configured CI after a merge made with github.token
required: false
default: "true"
timeout:
description: Maximum release-follow time in seconds
required: false
default: "1800"
token:
description: GitHub App installation token used to author integration PRs
required: false
default: ""
runs:
using: composite
steps:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.11"
- shell: bash
run: python -m pip install "${{ github.action_path }}"
- shell: bash
env:
DEPLOYBOT_CONFIG: ${{ inputs.config }}
DEPLOYBOT_MODE: ${{ inputs.mode }}
GH_TOKEN: ${{ inputs.token || github.token }}
DEPLOYBOT_FOLLOW: ${{ inputs.follow }}
DEPLOYBOT_DISPATCH_CI: ${{ inputs.dispatch_ci }}
DEPLOYBOT_TIMEOUT: ${{ inputs.timeout }}
run: |
case "$DEPLOYBOT_MODE" in
react)
args=(react --timeout "$DEPLOYBOT_TIMEOUT")
if [[ "$DEPLOYBOT_DISPATCH_CI" == "true" ]]; then
args+=(--dispatch-ci)
fi
if [[ "$DEPLOYBOT_FOLLOW" == "true" ]]; then
args+=(--follow)
fi
;;
follow)
args=(follow --timeout "$DEPLOYBOT_TIMEOUT" --if-needed)
;;
*)
echo "mode must be react or follow" >&2
exit 2
;;
esac
deploybot --config "$DEPLOYBOT_CONFIG" "${args[@]}"