Skip to content

core_merge

core_merge #458

name: library/helloworld:latest
on:
repository_dispatch:
types: [core_merge]
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Everyday at 12AM
push:
branches: [main]
paths:
- 'library/helloworld/**'
- '.github/workflows/library-helloworld.yaml'
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
paths:
- 'library/helloworld/**'
- '.github/workflows/library-helloworld.yaml'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- plat: qemu
arch: x86_64
- plat: qemu
arch: arm64
- plat: fc
arch: x86_64
- plat: xen
arch: x86_64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build helloworld
uses: unikraft/kraftkit@staging
with:
loglevel: debug
workdir: library/helloworld
runtimedir: /github/workspace/.kraftkit
plat: ${{ matrix.plat }}
arch: ${{ matrix.arch }}
push: false
execute: ${{ matrix.plat == 'qemu' && matrix.arch == 'x86_64' }}
output: oci://index.unikraft.io/unikraft.org/helloworld:latest
- name: Archive OCI digests
uses: actions/upload-artifact@v4
with:
name: oci-digests-${{ matrix.arch }}-${{ matrix.plat }}
path: ${{ github.workspace }}/.kraftkit/oci/digests
if-no-files-found: error
push:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to OCI registry
uses: docker/login-action@v3
with:
registry: index.unikraft.io
username: ${{ secrets.REG_USERNAME }}
password: ${{ secrets.REG_TOKEN }}
- name: Retrieve, merge and push OCI digests
uses: ./.github/actions/merge-oci-digests
with:
name: index.unikraft.io/unikraft.org/helloworld:latest
push: true