diff --git a/.github/ci/Dockerfile b/.github/ci/Dockerfile index d2bd1b3..1318c16 100644 --- a/.github/ci/Dockerfile +++ b/.github/ci/Dockerfile @@ -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 diff --git a/.github/workflows/build_release.yaml b/.github/workflows/build_release.yaml index 6363dab..5764dd4 100644 --- a/.github/workflows/build_release.yaml +++ b/.github/workflows/build_release.yaml @@ -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 @@ -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 diff --git a/.github/workflows/build_revision.yaml b/.github/workflows/build_revision.yaml index 6bf7e48..5b8d7b9 100644 --- a/.github/workflows/build_revision.yaml +++ b/.github/workflows/build_revision.yaml @@ -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 @@ -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 diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml index 9bfc08f..3d2211d 100644 --- a/.github/workflows/build_test.yaml +++ b/.github/workflows/build_test.yaml @@ -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 @@ -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