diff options
author | 2025-10-18 16:55:16 +0100 | |
---|---|---|
committer | 2025-10-18 21:20:00 +0100 | |
commit | a0bf8596f293adf89c971409e94cf6c767864fed (patch) | |
tree | 9d055b783bf36ef8c4f94ccc733fb353dad868c8 | |
parent | Build and use PyDis image when deploying to Kubernetes (diff) |
Add local registry for sharing between buildx jobs
-rw-r--r-- | .github/workflows/build.yaml | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d4e40ec..72d28c4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,6 +12,11 @@ jobs: build: name: Build snekbox-integration image runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 outputs: artifact: ${{ env.artifact }} version: ${{ steps.version.outputs.version }} @@ -38,6 +43,8 @@ jobs: # the builds. See https://github.com/docker/build-push-action - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host - name: Log in to GitHub Container Registry uses: docker/login-action@v3 @@ -78,7 +85,7 @@ jobs: with: context: . file: ./Dockerfile - push: false + push: true target: venv build-args: DEV=1 cache-from: | @@ -86,7 +93,7 @@ jobs: ghcr.io/python-discord/snekbox-base:latest ghcr.io/python-discord/snekbox-venv:latest cache-to: ${{ steps.cache_config.outputs.cache_to }} - tags: snekbox-venv:${{ steps.version.outputs.version }} + tags: localhost:5000/local/snekbox-venv:${{ steps.version.outputs.version }} - name: Build integration image for testing uses: docker/build-push-action@v6 @@ -96,9 +103,7 @@ jobs: push: false pull: false outputs: type=docker,dest=${{ env.artifact }}.tar - build-args: SNEKBOX_IMAGE=snekbox-venv - build-contexts: | - snekbox-venv=docker-image://snekbox-venv:${{ steps.version.outputs.version }} + build-args: SNEKBOX_IMAGE=localhost:5000/local/snekbox-venv:${{ steps.version.outputs.version }} cache-from: | ${{ steps.cache_config.outputs.cache_from }} ghcr.io/python-discord/snekbox-venv:latest |