Merge pull request #970 from crazy-max/nocache-mod-outdated

chore: use no-cache-filter for outdated stage
pull/1041/head
Tõnis Tiigi 3 years ago committed by GitHub
commit c3db06cda0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,6 +30,8 @@ jobs:
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
with:
version: latest
- -
name: Test name: Test
run: | run: |
@ -102,6 +104,7 @@ jobs:
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
with: with:
version: latest
driver-opts: image=moby/buildkit:master driver-opts: image=moby/buildkit:master
buildkitd-flags: --debug buildkitd-flags: --debug
- -

@ -51,6 +51,11 @@ jobs:
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
if: matrix.driver == 'docker' || matrix.driver == 'docker-container' if: matrix.driver == 'docker' || matrix.driver == 'docker-container'
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
- -
name: Install buildx name: Install buildx
run: | run: |

@ -27,6 +27,11 @@ jobs:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
- -
name: Run name: Run
run: | run: |
@ -40,6 +45,11 @@ jobs:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
- -
name: Run name: Run
run: | run: |

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.4
ARG GO_VERSION=1.17 ARG GO_VERSION=1.17
ARG DOCKERD_VERSION=20.10.8 ARG DOCKERD_VERSION=20.10.8

@ -89,11 +89,7 @@ target "mod-outdated" {
inherits = ["_common"] inherits = ["_common"]
dockerfile = "./hack/dockerfiles/vendor.Dockerfile" dockerfile = "./hack/dockerfiles/vendor.Dockerfile"
target = "outdated" target = "outdated"
args = { no-cache-filter = ["outdated"]
// used to invalidate cache for outdated run stage
// can be dropped when https://github.com/moby/buildkit/issues/1213 fixed
_RANDOM = uuidv4()
}
output = ["type=cacheonly"] output = ["type=cacheonly"]
} }

@ -429,7 +429,7 @@ Attribute keys:
- `src`, `source` - Secret filename. `id` used if unset. - `src`, `source` - Secret filename. `id` used if unset.
```dockerfile ```dockerfile
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.4
FROM python:3 FROM python:3
RUN pip install awscli RUN pip install awscli
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \ RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
@ -448,7 +448,7 @@ Attribute keys:
- `env` - Secret environment variable. `id` used if unset, otherwise will look for `src`, `source` if `id` unset. - `env` - Secret environment variable. `id` used if unset, otherwise will look for `src`, `source` if `id` unset.
```dockerfile ```dockerfile
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.4
FROM node:alpine FROM node:alpine
RUN --mount=type=bind,target=. \ RUN --mount=type=bind,target=. \
--mount=type=secret,id=SECRET_TOKEN \ --mount=type=secret,id=SECRET_TOKEN \
@ -480,7 +480,7 @@ authentication (e.g., cloning a private repository).
Example to access Gitlab using an SSH agent socket: Example to access Gitlab using an SSH agent socket:
```dockerfile ```dockerfile
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.4
FROM alpine FROM alpine
RUN apk add --no-cache openssh-client RUN apk add --no-cache openssh-client
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.3-labs # syntax=docker/dockerfile:1.4
FROM alpine:3.14 AS gen FROM alpine:3.14 AS gen
RUN apk add --no-cache git RUN apk add --no-cache git

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.3-labs # syntax=docker/dockerfile:1.4
ARG GO_VERSION=1.17 ARG GO_VERSION=1.17
ARG FORMATS=md,yaml ARG FORMATS=md,yaml

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.4
ARG GO_VERSION=1.17 ARG GO_VERSION=1.17

@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.3-labs # syntax=docker/dockerfile:1.4
ARG GO_VERSION=1.17 ARG GO_VERSION=1.17
ARG MODOUTDATED_VERSION=v0.8.0 ARG MODOUTDATED_VERSION=v0.8.0
@ -39,7 +39,6 @@ EOT
FROM psampaz/go-mod-outdated:${MODOUTDATED_VERSION} AS go-mod-outdated FROM psampaz/go-mod-outdated:${MODOUTDATED_VERSION} AS go-mod-outdated
FROM base AS outdated FROM base AS outdated
ARG _RANDOM
RUN --mount=target=.,ro \ RUN --mount=target=.,ro \
--mount=target=/go/pkg/mod,type=cache \ --mount=target=/go/pkg/mod,type=cache \
--mount=from=go-mod-outdated,source=/home/go-mod-outdated,target=/usr/bin/go-mod-outdated \ --mount=from=go-mod-outdated,source=/home/go-mod-outdated,target=/usr/bin/go-mod-outdated \

Loading…
Cancel
Save