Skip to content

Use custom buildah commands instead of action #18

Use custom buildah commands instead of action

Use custom buildah commands instead of action #18

Workflow file for this run

name: CI/CD
on: push
jobs:
cicd:
name: CI/CD
runs-on:
- self-hosted
- v3
- yocto
container:
image: ghcr.io/hulks/meta-nao-cicd
options: --user=1000:1000
env:
version: 7.5.0
registry: ghcr.io/${{ github.repository_owner }}
tag: ${{ env.registry }}/naosdk:${{ env.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
path: meta-nao
- name: Checkout Yocto layers
run: kas checkout meta-nao/kas/base.yml:meta-nao/kas/hulks.yml
- name: Populate aldebaran_binaries.tar.gz
run: mkdir -p meta-nao/meta/recipes-support/aldebaran/aldebaran-binaries/ && cp /aldebaran_binaries.tar.gz meta-nao/meta/recipes-support/aldebaran/aldebaran-binaries/
- name: Build NAO image
run: kas build --target nao-image --cmd build meta-nao/kas/base.yml:meta-nao/kas/hulks.yml
- name: Build SDK (x86_64)
run: kas build --target nao-image --cmd populate_sdk meta-nao/kas/base.yml:meta-nao/kas/hulks.yml
- name: Build SDK (aarch64)
run: kas build --target nao-image --cmd populate_sdk meta-nao/kas/base.yml:meta-nao/kas/hulks.yml:meta-nao/kas/aarch64.yml
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ github.actor }}
password: ${{ github.token }}
registry: ${{ env.registry }}
- name: Build development image
run: |
buildah manifest exists naosdk || buildah manifest create naosdk
sudo buildah bud --arch x86_64 --manifest naosdk --tag ${{ env.tag }}
sudo buildah bud --arch aarch64 --manifest naosdk --tag ${{ env.tag }}
- name: Push development image to ghcr.io
buildah manifest push --all naosdk "docker://${{ env.tag }}"
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: HULKs-OS ${{ github.ref_name }}
body: Flashable image containing HULKs-OS ${{ github.ref_name }} and the corresponding SDK with the toolchain and other tools targeting HULKs-OS, for instructions see https://hulks.de/hulk/setup/overview/
files: |
build/tmp/deploy/images/nao-v6/nao-image-HULKs-OS-${{ github.ref_name }}.ext3.gz.opn
build/tmp/deploy/sdk/HULKs-OS-x86_64-toolchain-${{ github.ref_name }}.sh
build/tmp/deploy/sdk/HULKs-OS-aarch64-toolchain-${{ github.ref_name }}.sh
fail_on_unmatched_files: true