Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 75 additions & 6 deletions .github/templates/coral-kernel-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down