From 9474653a03d26103a865bd774080d4be715fef26 Mon Sep 17 00:00:00 2001 From: Hasibur Rahman Mohammed Date: Tue, 30 Dec 2025 13:28:42 +0530 Subject: [PATCH] Update coral template to add workflow triggers This commit updates the coral template for kernel-config workflows, This adds the worklow trigger for `ubuntu-package-generation`, `build-yocto` and `add-reviewers` workflows. Signed-off-by: Hasibur Rahman Mohammed --- .github/templates/coral-kernel-template.yaml | 81 ++++++++++++++++++-- 1 file changed, 75 insertions(+), 6 deletions(-) diff --git a/.github/templates/coral-kernel-template.yaml b/.github/templates/coral-kernel-template.yaml index 8a297a7..d336cdf 100644 --- a/.github/templates/coral-kernel-template.yaml +++ b/.github/templates/coral-kernel-template.yaml @@ -83,15 +83,30 @@ on: workflow.ubuntu.id: type: number - required: true + required: false coral.actions/metadata: ui-annotations: type: Number - label: pre_merge_ubuntu Workflow ID - description: ID of the Ubuntu Package Generation Workflow to be executed - rules: - - type: required - message: Ubuntu package generation Workflow ID + label: Ubuntu package generation Workflow ID + description: ID of the Ubuntu package generation GitHub Workflow (Enter 0 to skip this run) + + workflow.yocto.id: + type: number + required: false + coral.actions/metadata: + ui-annotations: + type: Number + label: Yocto Build generation Workflow ID + description: ID of the Yocto Build GitHub Workflow (Enter 0 to skip this run) + + workflow.reviewer.id: + type: number + required: false + coral.actions/metadata: + ui-annotations: + type: Number + label: Add Reviewer Workflow ID + description: ID of the Add Reviewer GitHub Workflow (Enter 0 to skip this run) labels: type: string @@ -220,6 +235,60 @@ jobs: rm -rf $uuid coral.actions/expected-exit-codes: [0] + - name: ubuntu-generation + if: ${{ inputs.workflow.ubuntu.id != 0 }} + run: | + printenv + uuid=$(openssl rand -hex 16) + mkdir $uuid && cd $uuid + echo ${{ inputs.changeSpec }} | base64 -d > changeSpec.json + cp /bin/gh-utils/run_gh_action.sh script.sh + chmod +x script.sh + WORKFLOW_REPO_OWNER=${{ inputs.workflow.repo.owner }} \ + WORKFLOW_REPO=${{ inputs.workflow.repo.name }} \ + ACCESS_TOKEN=$(cat $GITHUB_TOKEN) \ + JSON_CHANGE_SPEC=changeSpec.json \ + WORKFLOW_ID=${{ inputs.workflow.ubuntu.id }} \ + ./script.sh + rm -rf $uuid + coral.actions/expected-exit-codes: [0] + + - name: pre-merge-yocto + if: ${{ inputs.workflow.yocto.id != 0 }} + run: | + printenv + uuid=$(openssl rand -hex 16) + mkdir $uuid && cd $uuid + echo ${{ inputs.changeSpec }} | base64 -d > changeSpec.json + cp /bin/gh-utils/run_gh_action.sh script.sh + chmod +x script.sh + WORKFLOW_REPO_OWNER=${{ inputs.workflow.repo.owner }} \ + WORKFLOW_REPO=${{ inputs.workflow.repo.name }} \ + ACCESS_TOKEN=$(cat $GITHUB_TOKEN) \ + JSON_CHANGE_SPEC=changeSpec.json \ + WORKFLOW_ID=${{ inputs.workflow.yocto.id }} \ + ./script.sh + rm -rf $uuid + coral.actions/expected-exit-codes: [0] + + - name: add-reviewer + if: ${{ inputs.workflow.reviewer.id != 0 }} + run: | + printenv + uuid=$(openssl rand -hex 16) + mkdir $uuid && cd $uuid + echo ${{ inputs.changeSpec }} | base64 -d > changeSpec.json + cp /bin/gh-utils/run_gh_action.sh script.sh + chmod +x script.sh + WORKFLOW_REPO_OWNER=${{ inputs.workflow.repo.owner }} \ + WORKFLOW_REPO=${{ inputs.workflow.repo.name }} \ + ACCESS_TOKEN=$(cat $GITHUB_TOKEN) \ + JSON_CHANGE_SPEC=changeSpec.json \ + WORKFLOW_ID=${{ inputs.workflow.reviewer.id }} \ + ./script.sh + rm -rf $uuid + coral.actions/expected-exit-codes: [0] + coral.actions/secrets: labels: - name: GithubToken