-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.33 KB
/
workflow_B.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# name: Remote Dispatch Action Responder
# on: [repository_dispatch]
# jobs:
# ping-pong:
# runs-on: ubuntu-latest
# steps:
# - name: Event Information
# run: |
# echo "Event '${{ github.event.action }}' received from '${{ github.event.client_payload.repository }}'"
# - name: PONG - Dispatch response to received PING
# if: github.event.action == 'ping'
# run: |
# curl -X POST https://github.com/Rollson/dispatch-a/dispatches \
# -H 'Accept: application/vnd.github.everest-preview+json' \
# -u ${{ secrets.ACCESS_TOKEN }} \
# --data '{"event_type": "pong", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'
name: Repository Dispatch
on:
repository_dispatch:
types: [my-event]
jobs:
myEvent:
runs-on: ubuntu-latest
steps:
- name: echo github.ref branch
run: echo "my branch is '${{ github.ref }}'"
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.ref }}
- name: List files in the repository
run: |
ls ${{ github.workspace }}
# - run: echo ${{ github.event.client_payload.sha }}
# - name: echo github.event.client_payload.ref branch
# run: echo "my branch is '${{ github.event.client_payload.ref }}'"
# hello chander