forked from arrow-kt/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (22 loc) · 1.03 KB
/
release-trigger.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
name: release-trigger
on:
push: # Events that trigger the action
branches: # Array of patterns that match refs/heads
- master # Push events on master branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Getting branch information and calling target webhook
env: # Or as an environment variable
USERTOKEN: ${{ secrets.TRY_ARROW_USERTOKEN }}
TARGETURL: ${{ secrets.TRY_ARROW_TARGETURL }}
COMMITSHA: ${{ github.sha }}
EVENT: ${{ github.event_name }}
run: |
echo #############################################
echo The event that triggered this was: $EVENT
export BRANCH_OR_RELEASE=$(echo ${{ github.ref }} | cut -f3 -d'/')
echo "$COMMITSHA and $BRANCH_OR_RELEASE"
curl -v -d '{"event_type": "'"$BRANCH_OR_RELEASE"':'"$COMMITSHA"'"}' -u $USERTOKEN $TARGETURL -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json"
echo Deployment request submitted to test-actions.