Skip to content

Compile Yocto Build

Compile Yocto Build #6

---
name: post_merge_yocto
run-name: Compile Yocto Build
on:
workflow_dispatch:
inputs:
sha:
description: Head sha on which Build needs to be triggered
type: string
required: true
ref:
description: Target branch
type: string
required: true
repo:
description: Target repository
type: string
required: true
kernel_ver:
description: Kernel version
type: string
required: true
jobs:
init-status:
name: Initialize Status
runs-on: ubuntu-latest
steps:
- name: Set Status
uses: qualcomm-linux/kernel-config/.github/actions/workflow_status@main
with:
sha: ${{ github.event.inputs.sha || github.sha }}
action_mode: start
check_name: "Yocto Build Generation"
repo: ${{ github.event.inputs.repo || github.repository }}
GH_TOKEN: ${{ secrets.PAT }}
init:
name: Initialize Workflow
needs: init-status
runs-on: ubuntu-latest
steps:
- name: Update Summary
run: |
echo "## Yocto Build Generation" >> $GITHUB_STEP_SUMMARY
echo "- Pull Request Number: \`${{ github.event.inputs.pr || 'N/A' }}\`" >> $GITHUB_STEP_SUMMARY
echo "- Head Commit SHA: \`${{ github.event.inputs.sha || 'N/A' }}\`" >> $GITHUB_STEP_SUMMARY
echo "- Target Branch: \`${{ github.event.inputs.ref || 'N/A' }}\`" >> $GITHUB_STEP_SUMMARY
echo "- Target Repository: \`${{ github.event.inputs.repo || 'N/A' }}\`" >> $GITHUB_STEP_SUMMARY
loading:
name: Load Parameters
needs: init-status
uses: qualcomm-linux/kernel-config/.github/workflows/loading.yml@main
secrets: inherit
build_yocto:
name: Build Yocto
needs: [init-status, init, loading]
uses: qualcomm-linux/kernel-config/.github/workflows/build-yocto.yml@main
secrets: inherit
with:
repo: ${{ github.event.inputs.repo || 'qualcomm-linux/kernel' }}
ref: ${{ github.event.inputs.ref || 'qcom-next' }}
SHA: ${{ github.event.inputs.sha }}
rootfs_matrix: ${{ needs.loading.outputs.rootfs_matrix }}
kernel_ver: ${{ github.event.inputs.kernel_ver }}
check_run:
runs-on: ubuntu-latest
needs: [init-status, init, loading, build_yocto]
steps:
- name: Post check run
uses: qualcomm-linux/kernel-config/.github/actions/check_run@main
with:
sha: ${{ inputs.sha }}
repo: ${{ inputs.repo }}
s3_location: ${{ needs.build_yocto.outputs.artifacts_location }}
workflow_name: " for ${{ github.workflow }}"
APPID: ${{ secrets.APPID }}
PVK: ${{ secrets.PVK }}
final-status:
name: Finalize Status
if: always()
runs-on: ubuntu-latest
needs: [build_yocto, check_run]
steps:
- name: Set final status
uses: qualcomm-linux/kernel-config/.github/actions/workflow_status@main
with:
sha: ${{ github.event.inputs.sha || github.sha }}
action_mode: ${{ needs.build_yocto.result }}
check_name: "Yocto Build Generation"
repo: ${{ github.event.inputs.repo || github.repository }}
GH_TOKEN: ${{ secrets.PAT }}