Skip to content

Commit 20d64e1

Browse files
committed
feat: deploy
1 parent eb18526 commit 20d64e1

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed
+15-18
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
name: Pull request comment
2+
23
on:
34
issue_comment:
45
types: [created, edited, deleted]
6+
57
jobs:
6-
job01:
7-
if: contains(github.event.comment.html_url, '/pull/') # check if the comments come from pull request, exclude those from issue.
8-
runs-on: [ubuntu-latest]
8+
output-context:
9+
runs-on: ubuntu-latest
910
steps:
10-
- name: say hello
11-
if: contains(github.event.comment.body, '/support') # check the comment if it contains the keywords
12-
run: |
13-
echo say hello
14-
15-
- name: test
16-
if: contains(github.event.comment.body, '/test') # check the comment if it contains the keywords
17-
run: |
18-
echo test
11+
- name: Dump GitHub context
12+
env:
13+
GITHUB_CONTEXT: ${{ toJSON(github) }}
14+
run: echo "$GITHUB_CONTEXT"
1915

20-
- name: deploy
21-
if: contains(github.event.comment.body, '/deploy') # check the comment if it contains the keywords
22-
uses: ./.github/workflows/shared-build-and-deploy.yaml
23-
# secrets: inherit
24-
with:
25-
deploy: true
16+
build-and-deploy:
17+
# check if the comment comes from a pull request and contains the required keyword
18+
if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/deploy')
19+
uses: ./.github/workflows/shared-build-and-deploy.yaml
20+
with:
21+
deploy: true
22+
secrets: inherit

0 commit comments

Comments
 (0)