Skip to content

Commit

Permalink
fix: try to make docker build work again
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed Dec 2, 2024
1 parent 4d971ea commit 0c9008e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .github/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ARG DOCKER_ARCH
ARG DEBIAN_VERSION
FROM ${DOCKER_ARCH}debian:${DEBIAN_VERSION} as build_env
FROM debian:${DEBIAN_VERSION} as build_env

RUN apt-get -y update && apt-get -y install gnupg2

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
strategy:
matrix:
debian_version: [bullseye, bookworm]
docker_arch: [amd64, arm32v7, arm64v8]
docker_platform: [linux/amd64, linux/arm/v7, linux/arm64/v8]
build_type: [generic, raspi]
exclude:
- docker_arch: amd64
- docker_platform: linux/amd64
build_type: raspi
steps:
- name: Checkout
Expand All @@ -38,10 +38,9 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Dockerfile
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DOCKER_ARCH --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE .
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE --platform "${{ matrix.docker_platform }}" .
env:
DEBIAN_VERSION: ${{ matrix.debian_version }}
DOCKER_ARCH: ${{ matrix.docker_arch }}/
BUILD_TYPE: ${{ matrix.build_type }}
- name: Create container
run: docker create --name deb_make deb_make
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/build_revision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ jobs:
contents: write
strategy:
matrix:
debian_version: [bullseye]
docker_arch: [amd64, arm32v7, arm64v8]
debian_version: [bullseye, bookworm]
docker_platform: [linux/amd64, linux/arm/v7, linux/arm64/v8]
build_type: [generic, raspi]
exclude:
- docker_arch: amd64
build_type: raspi
- debian_version: buster
- docker_platform: linux/amd64
build_type: raspi
steps:
- name: Checkout
Expand All @@ -84,10 +82,9 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Dockerfile
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DEB_REVISION --build-arg DOCKER_ARCH --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE .
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DEB_REVISION --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE --platform "${{ matrix.docker_platform }}" .
env:
DEBIAN_VERSION: ${{ matrix.debian_version }}
DOCKER_ARCH: ${{ matrix.docker_arch }}/
BUILD_TYPE: ${{ matrix.build_type }}
- name: Create container
run: docker create --name deb_make deb_make
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
strategy:
matrix:
debian_version: [bullseye, bookworm]
docker_arch: [amd64, arm32v7, arm64v8]
docker_platform: [linux/amd64, linux/arm/v7, linux/arm64/v8]
build_type: [generic, raspi]
exclude:
- docker_arch: amd64
- docker_platform: linux/amd64
build_type: raspi
steps:
- name: Checkout
Expand All @@ -28,18 +28,22 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Dockerfile
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DOCKER_ARCH --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE .
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE --platform "${{ matrix.docker_platform }}" .
env:
DEBIAN_VERSION: ${{ matrix.debian_version }}
DOCKER_ARCH: ${{ matrix.docker_arch }}/
BUILD_TYPE: ${{ matrix.build_type }}
- name: Create container
run: docker create --name deb_make deb_make
- name: Copy files
run: docker cp deb_make:/deb/. deb/
- name: Docker platform
run: |
RAW_DOCKER_PLATFORM="${{ matrix.docker_platform }}"
DOCKER_PLATFORM=$(echo $RAW_DOCKER_PLATFORM | sed 's!/!_!g')
echo "DOCKER_PLATFORM=$DOCKER_PLATFORM" >> $GITHUB_ENV
- name: 'Upload debian files'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.debian_version }}-${{ matrix.docker_arch }}-${{ matrix.build_type }}.zip
name: ${{ matrix.debian_version }}-${{ env.DOCKER_PLATFORM }}-${{ matrix.build_type }}.zip
path: deb/
retention-days: 14

0 comments on commit 0c9008e

Please sign in to comment.