diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d29f95af..7a9aae3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,11 @@ jobs: if: startsWith(matrix.os, 'macOS-') run: | brew install pass + - + name: Install gopass + env: + GOPASS_VERSION: v1.15.5 + run: go install github.com/gopasspw/gopass@${{ env.GOPASS_VERSION }} - name: GPG conf if: ${{ !startsWith(matrix.os, 'windows-') }} @@ -100,6 +105,18 @@ jobs: run: | pass init 7D851EB72D73BDA0 shell: bash + - + name: Init gopass + run: | + gopass config mounts.path "${HOME}/.gopass-password-store" 1>/dev/null + gopass config core.autopush false 1>/dev/null + gopass config core.autosync false 1>/dev/null + gopass config core.exportkeys false 1>/dev/null + gopass config core.notifications false 1>/dev/null + gopass config core.color false 1>/dev/null + gopass config core.nopager true 1>/dev/null + gopass init --crypto gpgcli --storage fs 7D851EB72D73BDA0 + shell: bash - name: Test run: | diff --git a/Dockerfile b/Dockerfile index 06cfe40f..e5a88802 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ARG XX_VERSION=1.4.0 ARG OSXCROSS_VERSION=11.3-r7-debian ARG GOLANGCI_LINT_VERSION=v1.55.2 ARG DEBIAN_FRONTEND=noninteractive +ARG GOPASS_VERSION=v1.15.5 ARG PACKAGE=github.com/docker/docker-credential-helpers @@ -68,12 +69,19 @@ RUN xx-apt-get install -y binutils gcc libc6-dev libgcc-10-dev libsecret-1-dev p FROM base AS test ARG DEBIAN_FRONTEND +ARG GOPASS_VERSION RUN xx-apt-get install -y dbus-x11 gnome-keyring gpg-agent gpgconf libsecret-1-dev pass +RUN --mount=type=bind,target=. \ + --mount=type=cache,target=/root/.cache \ + --mount=type=cache,target=/go/pkg/mod \ + GOFLAGS='' go install github.com/gopasspw/gopass@${GOPASS_VERSION} RUN --mount=type=bind,target=. \ --mount=type=cache,target=/root/.cache \ --mount=type=cache,target=/go/pkg/mod </dev/null + gopass config core.autopush false 1>/dev/null + gopass config core.autosync false 1>/dev/null + gopass config core.exportkeys false 1>/dev/null + gopass config core.notifications false 1>/dev/null + gopass config core.color false 1>/dev/null + gopass config core.nopager true 1>/dev/null + gopass init --crypto gpgcli --storage fs 7D851EB72D73BDA0 + gpg -k mkdir /out @@ -106,7 +127,8 @@ RUN --mount=type=bind,target=. \ --mount=type=bind,source=/tmp/.revision,target=/tmp/.revision,from=version <