-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (29 loc) · 1.26 KB
/
new_pr_bluetooth.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
name: NEW_ISSUE_OR_PR
on:
pull_request_target:
types: [opened, reopened]
issues:
types: [opened, reopened]
jobs:
call_printer_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Call my printer
if: ${{ github.event.pull_request }}
run: |
curl -i -X POST -H 'x-api-key: ${{ secrets.BLUE }}' -H "Content-Type: application/json" -d '{"type": "github", "info_type": "PR", "title": "${{ env.PR_TITLE }}", "content": "${{ env.PR_BODY }}", "repo": "${{ github.repository }}"}' https://app.yihong0618.me/call_bluetooth
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
call_printer_issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Call my printer
if: ${{ !github.event.issue.pull_request }}
run: |
curl -i -X POST -H 'x-api-key: ${{ secrets.BLUE }}' -H "Content-Type: application/json" -d '{"type": "github", "info_type": "Issue", "title": "${{ env.ISSUE_TITLE }}", "content": "${{ env.ISSUE_BODY }}", "repo": "${{ github.repository }}"}' https://app.yihong0618.me/call_bluetooth
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}