-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (52 loc) · 1.64 KB
/
droid.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
---
name: droid
on:
issues:
types:
- opened
issue_comment:
types:
- created
pull_request:
types:
- opened
jobs:
parse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
id: c-3po
with:
expect: |
- pattern: ^/hello (?<value>.+)$
- pattern: ^/chances (?<output>[^=]+)=(?<value>.*)$
- command: intrusion
- command: disappeared
value: R2-D2
description: 'true'
- if: ${{ steps.c-3po.outputs.is-hello }}
env:
INPUTS_ARG1: "${{ steps.c-3po.outputs.has-hello }}"
INPUTS_ARG2: ", it is you, it Is You!"
uses: actions/github-script@v7
with:
script: |
const args = [process.env.INPUTS_ARG1, process.env.INPUTS_ARG2]
core.info(args.join(''))
- if: ${{ steps.c-3po.outputs.is-chances && steps.c-3po.outputs.has-chances-survival }}
env:
INPUTS_ARG1: "R2 says the chances of survival are "
INPUTS_ARG2: "${{ steps.c-3po.outputs.has-chances-survival }}"
INPUTS_ARG3: "... to one"
uses: actions/github-script@v7
with:
script: |
const args = [process.env.INPUTS_ARG1, process.env.INPUTS_ARG2, process.env.INPUTS_ARG3]
core.info(args.join(''))
- if: ${{ steps.c-3po.outputs.is-chances && steps.c-3po.outputs.has-chances-win > 0 }}
run: echo "We'll take the next chance, and the next."
- if: ${{ steps.c-3po.outputs.is-intrusion }}
run: echo "We're doomed"
- if: ${{ steps.c-3po.outputs.is-disappeared }}
run: echo "${{ steps.c-3po.outputs.has-disappeared }}, where are you?"