-
Notifications
You must be signed in to change notification settings - Fork 4.8k
57 lines (51 loc) · 1.66 KB
/
command.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
name: Command
# NB: **ALL** commands should be permissionless and only use an app token or relevant secrets
# specific to their requirements!
permissions:
contents: read
on:
issue_comment:
types:
- created
env:
CI_DEBUG: ${{ vars.CI_DEBUG }}
jobs:
# For speed and _security_ only a single command (first matching) will be parsed/run from a comment
command:
name: Parse and run command
runs-on: ubuntu-22.04
if: >-
${{
github.event.issue.pull_request
&& (vars.ENVOY_CI
|| github.repository == 'envoyproxy/envoy')
&& github.actor != 'repokitteh-read-only[bot]'
&& github.actor != 'dependabot[bot]'
}}
steps:
- uses: envoyproxy/toolshed/gh-actions/github/[email protected]
name: Parse command from comment
id: command
with:
text: ${{ github.event.comment.body }}
matching: >-
^/(retest)
# /retest
- uses: envoyproxy/toolshed/gh-actions/[email protected]
if: ${{ steps.command.outputs.command == 'retest' }}
id: appauth-retest
name: Appauth (retest)
with:
key: ${{ secrets.ENVOY_CI_APP_KEY }}
app_id: ${{ secrets.ENVOY_CI_APP_ID }}
- uses: envoyproxy/toolshed/gh-actions/[email protected]
if: ${{ steps.command.outputs.command == 'retest' }}
name: Retest
with:
token: ${{ steps.appauth-retest.outputs.token }}
azp_org: cncf
azp_token: ${{ secrets.AZP_TOKEN }}
comment-id: ${{ github.event.comment.id }}
pr-url: ${{ github.event.issue.pull_request.url }}
args: ${{ steps.command.outputs.args }}
app-owner: ci-envoy