diff options
author | 2020-11-17 17:30:03 +0100 | |
---|---|---|
committer | 2020-11-17 17:30:03 +0100 | |
commit | 8fa65952a986b70f372601bc1cd780dd99ecbe74 (patch) | |
tree | 1bf377c4d2579e90f45f56b323135ba8a30a0a80 | |
parent | Fix error due to referencing value before it's set (diff) |
Add image tag arg to final dockerfile
-rw-r--r-- | .github/workflows/lint-test.yaml | 14 | ||||
-rw-r--r-- | 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"] |