Skip to content

Starting a branch build of Flex for 811/merge #1148

Starting a branch build of Flex for 811/merge

Starting a branch build of Flex for 811/merge #1148

name: 'Start Flex build'
run-name: 'Starting a branch build of Flex for ${{ github.ref_name }}'
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- labeled
jobs:
handle-push:
runs-on: 'ubuntu-latest'
if: github.event_name == 'push'
name: "Start a Flex build for a branch push of ${{ github.ref_name }}"
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, 'flex-build')
name: "Start a Flex build for a PR from branch ${{ github.ref_name }}"
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"
}