Skip to content

Commit

Permalink
Build and release devimage in separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
julianschuler committed Jun 17, 2024
1 parent 00de28f commit a7ae260
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ FROM ghcr.io/siemens/kas/kas:latest
LABEL org.opencontainers.image.source https://github.com/HULKs/meta-nao

COPY aldebaran_binaries.tar.gz /

RUN sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
buildah \
qemu-user-static
45 changes: 32 additions & 13 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,45 @@ jobs:
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: 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
devimage:
name: Build and release development image
needs: cicd
runs-on:
- self-hosted
- v3
container:
image: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
path: meta-nao
- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: latest-tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build development image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: naosdk
tags: latest ${{ github.sha }} ${{ github.ref_name }}
tags: latest ${{ github.sha }} ${{ latest-tag.outputs.tag }}
archs: x86_64, aarch64
containerfiles: ./Containerfile
build-args: version=${{ github.ref_name }}
build-args: version=${{ latest-tag.outputs.tag }}
- name: Push development image to ghcr.io
uses: redhat-actions/push-to-registry@v2
with:
Expand All @@ -42,14 +72,3 @@ jobs:
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ github.token }}
- 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

0 comments on commit a7ae260

Please sign in to comment.