Skip to content

Merge pull request #203 from superwall/custom-endpoint #313

Merge pull request #203 from superwall/custom-endpoint

Merge pull request #203 from superwall/custom-endpoint #313

Workflow file for this run

name: Dispatch UI Tests
on:
push:
branches:
- develop
jobs:
trigger_dispatch:
runs-on: ubuntu-latest
steps:
- name: Trigger repository_dispatch event
run: |
COMMIT_MSG=$(echo "${{ github.event.head_commit.message }}" | tr '\n' ' ' | base64)
PAYLOAD=$(jq -n \
--arg evt "branch-push" \
--arg ref "${{ github.ref }}" \
--arg commit "${{ github.sha }}" \
--arg author "${{ github.event.head_commit.author.name }}" \
--arg msg "$COMMIT_MSG" \
'{event_type: $evt, client_payload: {ref: $ref, commit: $commit, author: $author, message: $msg}}')
curl -X POST \
-H "Authorization: token ${{ secrets.UI_TESTS_REPO_ACCESS_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
"https://api.github.com/repos/superwall-me/Superwall-iOS-UI-tests/dispatches" \
-d "$PAYLOAD"