-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (28 loc) · 929 Bytes
/
LogTest.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: Trigger API on New Release
on:
release:
types: [published]
jobs:
call-api:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Release Tag Name and Zipball URL
id: get_release_info
run: |
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "ZIPBALL_URL=${{ github.event.release.zipball_url }}" >> $GITHUB_ENV
- name: Call External API
env:
RELEASE_TAG: ${{ env.RELEASE_TAG }}
ZIPBALL_URL: ${{ env.ZIPBALL_URL }}
LC_ID: ${{ secrets.LC_ID }}
LC_KEY: ${{ secrets.LC_KEY }}
run: |
curl -X POST \
-H "Content-Type: application/json" \
-H "X-LC-Id: $LC_ID" \
-H "X-LC-Key: $LC_KEY" \
-d "{\"tag_name\":\"$RELEASE_TAG\", \"zipball_url\":\"$ZIPBALL_URL\"}" \
https://kjkjjldq.lc-cn-n1-shared.com/1.1/classes/ReleaseMsgTest