mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Build Root Filesystem
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_call:
|
|
inputs:
|
|
submodule:
|
|
description: The directory of the submodule, if this workflow is being called on a submodule
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
rootfs:
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: miyoocfw/toolchain:master
|
|
env:
|
|
FORCE_UNSAFE_CONFIGURE: 1
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- if: inputs.submodule
|
|
run: git submodule update --init --depth 1 -- ${{ inputs.submodule }}
|
|
|
|
- name: Generate cache key
|
|
if: inputs.submodule
|
|
id: cache-key
|
|
run: |
|
|
cd ${{ inputs.submodule }}
|
|
echo "::set-output name=key::${{ inputs.submodule }}-$(git rev-parse --short HEAD)"
|
|
|
|
- uses: actions/cache@v3
|
|
if: inputs.submodule
|
|
with:
|
|
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
|
|
key: ${{ steps.cache-key.outputs.key }}
|
|
id: cache
|
|
|
|
- name: build
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
cd ${{ inputs.submodule || '.' }}
|
|
make
|
|
cd output/images/
|
|
xz rootfs.tar
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: rootfs.tar.xz
|
|
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
|
|
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|