Skip to content

Commit b8d35d1

Browse files
committed
Added github action to call vector webhook url
1 parent cef0363 commit b8d35d1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Docs to Vector
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
- docs-to-vector
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Call Webhook (Master)
15+
if: ${{ github.ref_name == 'master' }}
16+
run: |
17+
curl -X POST \
18+
-H "Content-Type: application/json" \
19+
-d '{"commit_id": "${{ github.sha }}", "branch": "${{ github.ref_name }}"}' \
20+
${{ secrets.VECTOR_WEBHOOK_URL }}
21+
22+
- name: Connect to company network
23+
if: ${{ github.ref_name != 'master' }}
24+
uses: tailscale/github-action@v3
25+
with:
26+
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
27+
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
28+
tags: tag:ci
29+
30+
- name: Call Webhook (Preview)
31+
if: ${{ github.ref_name != 'master' }}
32+
run: |
33+
curl -X POST \
34+
-H "Content-Type: application/json" \
35+
-d '{"commit_id": "${{ github.sha }}", "branch": "${{ github.ref_name }}"}' \
36+
${{ secrets.VECTOR_WEBHOOK_URL_PREVIEW }}
37+

0 commit comments

Comments
 (0)