File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 55 push :
66 branches :
77 - master
8-
9- env :
10- TARGET_BRANCH : ${{ github.ref_name }}
8+ - docs-to-vector
119
1210jobs :
1311 build :
1412 runs-on : ubuntu-latest
1513 steps :
16- - name : Connect Tailscale
17- # if branch is not master
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
1823 if : ${{ github.ref_name != 'master' }}
1924 uses : tailscale/github-action@v3
2025 with :
2126 oauth-client-id : ${{ secrets.TS_OAUTH_CLIENT_ID }}
2227 oauth-secret : ${{ secrets.TS_OAUTH_SECRET }}
2328 tags : tag:ci
2429
25- - name : Call Webhook
30+ - name : Call Webhook (Preview)
31+ if : ${{ github.ref_name != 'master' }}
2632 run : |
27- WEBHOOK_URL=${{ secrets.VECTOR_WEBHOOK_URL }}
28- if [ "${{ env.TARGET_BRANCH }}" != "master" ]; then
29- WEBHOOK_URL=${{ secrets.VECTOR_WEBHOOK_URL_PREVIEW }}
30- fi
3133 curl -X POST \
3234 -H "Content-Type: application/json" \
3335 -d '{"commit_id": "${{ github.sha }}", "branch": "${{ github.ref_name }}"}' \
34- ${WEBHOOK_URL}
36+ ${{ secrets.VECTOR_WEBHOOK_URL_PREVIEW }}
37+
You can’t perform that action at this time.
0 commit comments