CI: docs speedup by caching first stage (#29397)

* docs speedup

* fix tags on docs build

* build docs without build-push-action
This commit is contained in:
Justin Newberry
2023-08-14 14:36:17 -07:00
committed by GitHub
parent 5fd6589779
commit f8cbdcfa40
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -81,9 +81,11 @@ jobs:
submodules: true
- name: Build docker container
run: |
DOCKER_BUILDKIT=1 docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/openpilot-docs:latest -t $DOCKER_REGISTRY/openpilot-docs:latest -f docs/docker/Dockerfile .
DOCKER_BUILDKIT=1 docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/openpilot-docs-base:latest -t $DOCKER_REGISTRY/openpilot-docs-base:latest -f docs/docker/Dockerfile --target openpilot-docs-base .
DOCKER_BUILDKIT=1 docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/openpilot-docs-base:latest --cache-from $DOCKER_REGISTRY/openpilot-docs:latest -t $DOCKER_REGISTRY/openpilot-docs:latest -f docs/docker/Dockerfile .
- name: Push docker container
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
run: |
$DOCKER_LOGIN
docker push $DOCKER_REGISTRY/openpilot-docs:latest
docker push $DOCKER_REGISTRY/openpilot-docs-base:latest
docker push $DOCKER_REGISTRY/openpilot-docs:latest
+1 -1
View File
@@ -1,4 +1,4 @@
FROM ghcr.io/commaai/openpilot-base:latest
FROM ghcr.io/commaai/openpilot-base:latest as openpilot-docs-base
ENV PYTHONUNBUFFERED 1