Skip to content

support ubuntu preconfigure #16

support ubuntu preconfigure

support ubuntu preconfigure #16

Workflow file for this run

name: Ubuntu images
on:
workflow_dispatch:
push:
tags:
- ubuntu-*-*
# env:
# DEB_REPO: http://mirrors.edge.kernel.org/ubuntu
jobs:
build:
strategy:
matrix:
arch: [amd64, arm64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.arch }}
- run: echo "DEB_SUITE=$(echo ${GITHUB_REF_NAME} | awk -F'-' '{print $2}')" >> $GITHUB_ENV
- name: Build debootstrap docker image
run: docker build -t debootstrap ./ubuntu
- name: Debootstrap
run: |
docker run --rm \
-e ARCH=${{ matrix.arch }} \
-e DEB_SUITE \
-e DEB_REPO \
-v ${PWD}:/build \
debootstrap
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.arch }}
path: ./*.tar.gz
preconf:
needs: build
strategy:
matrix:
arch: [amd64, arm64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.arch }}
- uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.arch }}
- run: echo "DEB_SUITE=$(echo ${GITHUB_REF_NAME} | awk -F'-' '{print $2}')" >> $GITHUB_ENV
- name: Build debootstrap docker image
run: docker build -t debootstrap ./ubuntu
- name: Preconf
run: |
docker run --rm \
-e ARCH=${{ matrix.arch }} \
-e DEB_SUITE \
-e DEB_REPO \
-v ${PWD}:/build \
debootstrap /preconf.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.arch }}-prebuild
path: ./*.tar.gz
release:
runs-on: ubuntu-latest
needs: [build, preconf]
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: build-*
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v1
with:
# draft: true
files: ./*.tar.gz