aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/deploy.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/deploy.yaml')
-rw-r--r--.github/workflows/deploy.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index d8ad66b..48e66dd 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -22,6 +22,12 @@ jobs:
with:
name: ${{ inputs.artifact }}
+ - name: Set up Python
+ id: python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+
# Load the image to make use of common layers during the final build.
- name: Load image from archive
run: docker load -i ${{ inputs.artifact }}.tar
@@ -106,3 +112,24 @@ jobs:
tags: |
ghcr.io/python-discord/snekbox-venv:latest
ghcr.io/python-discord/snekbox-venv:${{ inputs.version }}
+
+ # Build a lightweight image with a singular python version
+ - name: Regenerate dockerfile
+ run: python scripts/set_versions.py
+ env:
+ VERSIONS_CONFIG: config/versions-light.json
+
+ - name: Build & push slim image
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ file: ./Dockerfile
+ push: true
+ cache-from: |
+ ghcr.io/python-discord/snekbox-base:latest
+ ghcr.io/python-discord/snekbox-venv:latest
+ ghcr.io/python-discord/snekbox:latest
+ cache-to: type=inline
+ tags: |
+ ghcr.io/python-discord/snekbox:latest-slim
+ ghcr.io/python-discord/snekbox:${{ inputs.version }}-slim