diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 201281b7..7fda5158 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y dbus-x11 gnome-keyring libsecret-1-dev pass + - + name: Install gopass + env: + GOPASS_VERSION: v1.15.5 + run: go install github.com/gopasspw/gopass@${{ env.GOPASS_VERSION }} + - name: GPG conf if: ${{ matrix.os == 'ubuntu-20.04' }} diff --git a/Dockerfile b/Dockerfile index 41432719..3078f386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ARG XX_VERSION=1.2.1 ARG OSXCROSS_VERSION=11.3-r7-debian ARG GOLANGCI_LINT_VERSION=v1.51.1 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 <