TachiyomiSY-Plus/.github/workflows/TachiyomiSY-Preview-Builder.yml
2020-06-14 17:22:13 -04:00

36 lines
1.4 KiB
YAML

name: Remote Dispatch Action Initiator
on:
push:
repository_dispatch:
jobs:
ping-pong:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: '0'
- name: Set SHOULD_RUN flag
run: echo ::set-env name=CISKIP::"contains(github.event.action, 'skip-ci')" || "contains(github.event.action, 'skip ci')" || "contains(github.event.action, 'ci skip')" || "contains(github.event.action, 'ci-skip')"
- name: Exho
run: echo env.CISKIP
- name: TAG - Bump version and push tag
uses: anothrNick/github-tag-action@1.17.2
if: github.event.action != 'pong' && env.CISKIP == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: master
- name: PING - Dispatch initiating repository event
if: github.event.action != 'pong' && env.CISKIP == 'false'
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 }}'"