Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Feb 13, 2024
1 parent 6ccd3b1 commit 99ed872
Show file tree
Hide file tree
Showing 3 changed files with 759 additions and 0 deletions.
142 changes: 142 additions & 0 deletions .github/workflows/dispatch-yocto-build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: "Build balenaOS"

on:
pull_request:
types: [opened, synchronize]
branches:
- "main"
- "master"
pull_request_target:
types: [opened, synchronize]
branches:
- "main"
- "master"

workflow_dispatch:
inputs:
device-repo:
description: balenaOS device repository (owner/repo)
required: true
type: string
device-repo-ref:
description: balenaOS device repository tag, branch, or commit to build
required: false
type: string
default: master
meta-balena-ref:
description: meta-balena ref if not the currently pinned version
required: false
type: string
yocto-scripts-ref:
description: balena-yocto-scripts ref if not the currently pinned version
required: false
type: string
machine:
description: yocto board name
required: true
type: string
balena-environment:
description: balena environment URL (e.g. balena-cloud.com)
required: true
type: string
default: balena-cloud.com
hostapp-org:
description: balenaCloud Organization for deploying hostapp releases
required: false
type: string
default: balena_os
s3-region:
description: S3 region
required: false
type: string
default: us-east-1
s3-bucket:
description: S3 bucket
required: false
type: choice
options:
- resin-production-img-cloudformation
- resin-staging-img
aws-subnet-id:
description: AWS subnet for AMI deploys (production/staging)
required: false
type: choice
options:
- subnet-02d18a08ea4058574
- subnet-0d73c1f0da85add17
aws-security-group:
description: AWS security group for AMI deploys (production/staging)
required: false
type: choice
options:
- sg-057937f4d89d9d51c
- sg-09dd285d11b681946
sign-api-url:
description: URL for signing secure-boot images
required: false
type: string
default: https://sign.balena-cloud.com
yocto-cache-host:
description: Yocto NFS sstate cache host
required: false
type: string
default: nfs.product-os.io
deploy-s3:
description: Whether to deploy images to S3
required: false
type: boolean
default: true
deploy-hostapp:
description: Whether to deploy a hostApp container image to a balena environment
required: false
type: boolean
default: true
deploy-ami:
description: Whether to deploy an AMI to AWS
required: false
type: boolean
default: false
sign-image:
description: Whether to sign image for secure boot
required: false
type: boolean
default: false
do-esr:
description: Enable to deploy ESR
required: false
type: boolean
default: false

jobs:
flowzone:
name: Flowzone
uses: ./.github/workflows/yocto-build-deploy.yml
# prevent duplicate workflow executions for pull_request and pull_request_target
if: |
(
github.event.pull_request.head.repo.full_name == github.repository &&
github.event_name == 'pull_request'
) || (
github.event.pull_request.head.repo.full_name != github.repository &&
github.event_name == 'pull_request_target'
)
secrets: inherit
with:
device-repo: ${{ inputs.device-repo || 'balena-generic' }}
device-repo-ref: ${{ inputs.device-repo-ref || 'master' }}
meta-balena-ref: ${{ inputs.device-repo-ref }}
yocto-scripts-ref: ${{ inputs.yocto-scripts-ref }}
machine: ${{ inputs.machine || 'generic-amd64' }}
balena-environment: ${{ inputs.balena-environment || 'balena-cloud.com' }}
hostapp-org: ${{ inputs.balena-environment || 'balena_os' }}
s3-region: ${{ inputs.s3-region || 'us-east-1' }}
s3-bucket: ${{ inputs.s3-bucket || 'resin-staging-img' }}
aws-subnet-id: ${{ inputs.aws-subnet-id || 'subnet-0d73c1f0da85add17' }}
aws-security-group: ${{ inputs.aws-security-group || 'sg-09dd285d11b681946' }}
sign-api-url: ${{ inputs.sign-api-url }}
yocto-cache-host: ${{ inputs.yocto-cache-host }}
deploy-s3: ${{ inputs.deploy-s3 || 'false' }}
deploy-hostapp: ${{ inputs.deploy-hostapp || 'false' }}
deploy-ami: ${{ inputs.deploy-ami || 'false' }}
sign-image: ${{ inputs.sign-image || 'false' }}
do-esr: ${{ inputs.do-esr || 'false' }}
Loading

0 comments on commit 99ed872

Please sign in to comment.