Skip to content

Add ref for workflows reuse #15

Add ref for workflows reuse

Add ref for workflows reuse #15

name: Build Docker image
on:
workflow_dispatch:
env:
os: mageia
jobs:
build_for_target:
name: Build for target
runs-on: self-hosted
steps:
- name: Clone repo
uses: Chiogros/image-mageia/.github/workflows/checkout-self-hosted.yaml@main
- name: Build rootfs
uses: ./.github/workflows/build-rootfs.yaml
- name: Cache build
id: build
uses: actions/cache@v4
with:
path: |
./docker.tar.xz
key: image-${{ env.os }}-docker-${{ hashFiles('*.sqfs', '*.yaml') }}
- name: Make build-docker
if: steps.build.outputs.cache-hit != 'true'
run: make build-docker
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: image-${{ env.os }}-docker
path: |
./docker.tar.xz