50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Remote Dispatch Action Initiator
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
repository_dispatch:
|
|
|
|
jobs:
|
|
check_wrapper:
|
|
name: Validate Gradle Wrapper
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Clone repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/wrapper-validation-action@v1
|
|
|
|
preview:
|
|
name: Build app preview
|
|
needs: check_wrapper
|
|
if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Clone repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: TAG - Bump version and push tag
|
|
uses: anothrNick/github-tag-action@1.17.2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
WITH_V: true
|
|
RELEASE_BRANCHES: master
|
|
DEFAULT_BUMP: patch
|
|
|
|
- name: PING - Dispatch initiating repository event
|
|
run: |
|
|
curl -X POST https://api.github.com/repos/jobobby04/TachiyomiSYPreview/dispatches \
|
|
-H 'Accept: application/vnd.github.everest-preview+json' \
|
|
-u ${{ secrets.ACCESS_TOKEN }} \
|
|
--data '{"event_type": "ping", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'
|
|
|
|
- name: ACK - Acknowledge pong from remote repository
|
|
if: github.event.action == 'pong'
|
|
run: |
|
|
echo "PONG received from '${{ github.event.client_payload.repository }}'"
|