From 29c449aea8ec727c0693fccbf2e02cfe3b89ff1b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 30 Aug 2022 12:48:43 +0200 Subject: [PATCH 1/2] Dockerfile: debian based build Signed-off-by: CrazyMax --- .github/workflows/build.yml | 2 +- Dockerfile | 23 +++++++++++++++-------- pass/pass_test.go | 2 ++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 177be24d..e3ee1d87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -150,7 +150,7 @@ jobs: - name: Check artifacts run: | - find ${{ env.DESTDIR }} -type f -exec file -e ascii -- {} + + find ${{ env.DESTDIR }} -type f -exec file -e ascii -e text -- {} + - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/Dockerfile b/Dockerfile index 13296a4b..0df79274 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,9 @@ ARG GO_VERSION=1.18.5 ARG XX_VERSION=1.1.2 -ARG OSXCROSS_VERSION=11.3-r7-alpine +ARG OSXCROSS_VERSION=11.3-r7-debian ARG GOLANGCI_LINT_VERSION=v1.47.3 +ARG DEBIAN_FRONTEND=noninteractive ARG PACKAGE=github.com/docker/docker-credential-helpers @@ -13,9 +14,10 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx # osxcross contains the MacOSX cross toolchain for xx FROM crazymax/osxcross:${OSXCROSS_VERSION} AS osxcross -FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS gobase +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS gobase COPY --from=xx / / -RUN apk add --no-cache clang file git lld llvm make pkgconf rsync +ARG DEBIAN_FRONTEND +RUN apt-get update && apt-get install -y --no-install-recommends clang dpkg-dev file git lld llvm make pkg-config rsync ENV GOFLAGS="-mod=vendor" ENV CGO_ENABLED="1" WORKDIR /src @@ -49,9 +51,10 @@ RUN --mount=type=bind,target=.,rw < Date: Tue, 30 Aug 2022 12:51:33 +0200 Subject: [PATCH 2/2] ci: add concurrency check Signed-off-by: CrazyMax --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3ee1d87..c181b298 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,9 @@ name: build +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + on: workflow_dispatch: push: