Skip to content

Commit 88c607c

Browse files
committed
test dispatch action
1 parent 043fc4c commit 88c607c

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.github/workflows/main.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,18 @@ jobs:
5050
runs-on: ubuntu-latest
5151
needs: github_docker_build_publish_test
5252
steps:
53-
- uses: actions/checkout@v2
54-
- uses: actions/setup-python@v2
53+
# - uses: actions/checkout@v2
54+
# - uses: actions/setup-python@v2
55+
# with:
56+
# python-version: '3.7'
57+
# - name: Test biased_lang:test image
58+
# run: |
59+
# pip3 install requests
60+
# python3 check_github.py ${{ secrets.AT }}
61+
- name: Repository Dispatch
62+
uses: peter-evans/repository-dispatch@v1
5563
with:
56-
python-version: '3.7'
57-
- name: Test biased_lang:test image
58-
run: |
59-
pip3 install requests
60-
python3 check_github.py ${{ secrets.AT }}
64+
token: ${{ secrets.AT }}
65+
repository: splunk/test-biased-lang
66+
event-type: test-biased-lang
67+
client-payload: '{"ref": "main"}'

check_github.py

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
r = requests.post('https://api.github.com/repos/splunk/test-biased-lang/actions/workflows/main.yml/dispatches', headers=headers, data=json.dumps({"ref": "main"}))
2727

2828
def get_total_runs():
29-
# return requests.get('https://api.github.com/repos/splunk/test-biased-lang/actions/workflows/8382216/runs?status=completed', headers=headers).json()
3029
return requests.get('https://api.github.com/repos/splunk/test-biased-lang/actions/workflows/main.yml/runs?status=completed', headers=headers).json()
3130

3231
if r.status_code >= 400:

0 commit comments

Comments
 (0)