Skip to content

build-maaxboard-sdk-images #1

build-maaxboard-sdk-images

build-maaxboard-sdk-images #1

name: build-maaxboard-sdk-images
on:
workflow_dispatch:
inputs:
yocto-image:
description: "The yocto image to build"
required: false
default: "core-image-base"
jobs:
build-yocto:
runs-on: [self-hosted, build]
container:
image: ghcr.io/avnet-iotconnect/meta-iotconnect/maaxboard-iotc-sdk-kirkstone:latest
options: --user pokyuser
credentials:
username: ${{github.actor}}
password: ${{secrets.GHCR_PAT}}
steps:
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: "Run yocto build"
run: |
cd /home/pokyuser
cd MaaXBoard_IoTC_kirkstone
set +e
MACHINE=maaxboard source sources/meta-maaxboard/tools/maaxboard-setup.sh -b maaxboard/build
cd ../../
source sources/poky/oe-init-build-env maaxboard/build/
git config --global user.email "ci-avnet@example.com"
git config --global user.name "CI Avnet"
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone https://github.com/avnet-iotconnect/meta-iotconnect.git -b kirkstone ../../sources/meta-iotconnect
bitbake-layers add-layer ../../sources/meta-iotconnect
bitbake ${{ github.event.inputs.yocto-image }}
shell: bash {0}
- uses: hkusu/s3-upload-action@v2.1.0
id: s3-upload
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'
aws-bucket: 'iotconnect-sdk-images'
file-path: /home/pokyuser/MaaXBoard_IoTC_kirkstone/maaxboard/build/tmp/deploy/images/maaxboard/core-image-base-maaxboard.wic
destination-dir: '/'
bucket-root: 'sdk-images'
public: true
output-file-url: 'true'