-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (58 loc) · 1.76 KB
/
start-ot3-build.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Start OT-3 build'
on:
push:
branches:
- main
tags:
- 'v*'
- '*@*'
pull_request:
types:
- opened
- synchronize
- labeled
jobs:
handle-push:
runs-on: 'ubuntu-latest'
if: github.event_name == 'push'
name: "Start an OT-3 build for a branch/tag push"
steps:
- name: 'start build'
uses: octokit/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.OT3_BUILD_CROSSREPO_ACCESS }}
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow-id}/dispatches
owner: opentrons
repo: oe-core
workflow-id: build-ot3-actions.yml
ref: main
inputs: |
{
"oe-core-ref": "-",
"monorepo-ref": "-",
"ot3-firmware-ref": "${{ github.ref }}",
"infra-stage": "stage-prod"
}
handle-pr:
runs-on: 'ubuntu-latest'
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'Opentrons/ot3-firmware' && contains(github.event.pull_request.labels.*.name, 'ot3-build')
name: "Start an OT-3 build for a requested PR"
steps:
- name: 'start build'
uses: octokit/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.OT3_BUILD_CROSSREPO_ACCESS }}
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow-id}/dispatches
owner: opentrons
repo: oe-core
workflow-id: build-ot3-actions.yml
ref: main
inputs: |
{
"oe-core-ref": "-",
"monorepo-ref": "-",
"ot3-firmware-ref": "refs/heads/${{ github.head_ref }}",
"infra-stage": "stage-prod"
}