pounder_test/.github/workflows/hitl_trigger.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

2021-04-09 19:24:46 +08:00
name: HITL Trigger
2021-01-09 00:28:07 +08:00
on:
workflow_dispatch:
2021-04-21 21:03:28 +08:00
push:
branches:
- staging
- trying
2021-01-09 00:28:07 +08:00
jobs:
2021-04-09 19:36:35 +08:00
hitl-trigger:
2021-01-09 00:28:07 +08:00
runs-on: ubuntu-latest
environment: hitl
steps:
2021-04-29 20:07:42 +08:00
- uses: LouisBrunner/checks-action@v1.1.1
id: hitl-check
with:
repo: ${{ github.repository }}
sha: ${{ github.event.head_commit.id }}
token: ${{ github.token }}
name: HITL Run Status
status: in_progress
details_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
2021-04-29 20:12:22 +08:00
output: |
{"summary": "Starting..."}
2021-04-29 20:07:42 +08:00
2021-01-09 00:28:07 +08:00
- uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_PAT }}
2021-01-09 02:13:23 +08:00
event-type: stabilizer
2021-01-09 00:28:07 +08:00
repository: quartiq/hitl
2021-04-29 20:07:42 +08:00
client-payload: |
2021-04-29 20:15:16 +08:00
{"github": ${{ toJson(github) }}, "check_id": ${{steps.hitl-check.outputs.check_id}}}
2021-04-09 18:33:54 +08:00
2021-04-09 17:27:27 +08:00
- uses: fountainhead/action-wait-for-check@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
2021-04-09 19:35:23 +08:00
checkName: HITL Run Status
2021-04-09 17:27:27 +08:00
ref: ${{ github.event.pull_request.head.sha }}