support ubuntu preconfigure #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Debian images | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- debian-*-* | |
# env: | |
# DEB_REPO: http://mirrors.edge.kernel.org/debian | |
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 ./debian | |
- 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 ./debian | |
- 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 |