From 8fa65952a986b70f372601bc1cd780dd99ecbe74 Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Tue, 17 Nov 2020 17:30:03 +0100 Subject: Add image tag arg to final dockerfile --- .github/workflows/lint-test.yaml | 14 ++++++++++---- docker/Dockerfile | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 7f1bcbc..355755e 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -47,8 +47,10 @@ jobs: file: ./docker/base.Dockerfile push: false load: true - cache-from: type=local,src=/tmp/.base-buildx-cache, - cache-to: type=local,dest=/tmp/.base-buildx-cache, + cache-from: | + type=local,src=/tmp/.base-buildx-cache + ghcr.io/python-discord/snekbox-base:latest + cache-to: type=local,type=local,dest=/tmp/.base-buildx-cache tags: ghcr.io/python-discord/snekbox-base:${{ steps.sha_tag.outputs.tag }} - name: Show Containers @@ -113,9 +115,13 @@ jobs: uses: docker/build-push-action@v2 with: context: . - file: ./docker/base.Dockerfile + file: ./docker/Dockerfile + build-args: IMAGE_TAG=${{ steps.sha_tag.outputs.tag }} push: true - cache-from: type=local,dest=/tmp/.final-buildx-cache,type=local,src=/tmp/.base-buildx-cache + cache-from: | + type=local,src=/tmp/.base-buildx-cache + type=local,dest=/tmp/.final-buildx-cache + ghcr.io/python-discord/snekbox:latest cache-to: type=local,dest=/tmp/.final-buildx-cache, tags: ghcr.io/python-discord/snekbox:latest diff --git a/docker/Dockerfile b/docker/Dockerfile index d8b89ec..9ebc82c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,5 @@ -FROM ghcr.io/python-discord/snekbox-venv:latest +ARG IMAGE_TAG=latest +FROM ghcr.io/python-discord/snekbox-base:$IMAGE_TAG ENTRYPOINT ["gunicorn"] CMD ["-c", "config/gunicorn.conf.py", "snekbox.api.app"] -- cgit v1.2.3