At DownToZero, we’re committed to eliminating waste - whether it’s in compute, energy, or operational overhead. One challenge many teams face in containerized environments is handling updates to container images. Traditionally, deployments often rely on polling for updates when using tags like latest. This leads to unnecessary requests, increased latency for updates, and inefficient resource usage.
To address this, we are introducing a new way to integrate deployments directly with GitHub Actions. With the newly developed DTZ GitHub Action, container image updates can now be pushed directly from your GitHub pipeline into DownToZero. This means no more waiting, no more polling—just immediate, streamlined deployments.
From commit to deploy in one pass: build the image, push to your container registry, resolve the exact digest, and update the target service via the DTZ GitHub Action. No polling or ambiguity—just precise, digest-driven releases.
flowchart LR
subgraph GitHub Actions
A[Commit / Dispatch / Schedule]:::action --> B[Build Docker Image]:::action
B --> C[Push to Container Registry]:::action
C --> D[Resolve Image Digest]:::action
D --> E[DTZ Action: Update Service]:::action
end
subgraph DownToZero
R[(DTZ Container Registry)]:::registry
S[Container Service]:::service
end
C --> R
E --> S
classDef action fill:#fff8e1,stroke:#f9a825,color:#5d4037
classDef registry fill:#e3f2fd,stroke:#1e88e5,color:#0d47a1
classDef service fill:#e8f5e9,stroke:#43a047,color:#1b5e20
The DTZ GitHub Action connects your GitHub workflow with your DownToZero container services. Once your pipeline builds and pushes a new container image, the action automatically updates the designated service with the freshly built image digest.
This ensures:
latest—deployments reference the exact image digest.Here’s a sample GitHub Actions workflow showing how this integration looks in practice:
on:
push:
workflow_dispatch:
schedule: # scheduled rebuild for security updates
- cron: '30 5 25 * *'
jobs:
build-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build website
run: |
docker build -t ee8h25d0.cr.dtz.dev/sample-website .
- name: Login to ee8h25d0.cr.dtz.dev
uses: docker/login-action@v3
with:
registry: ee8h25d0.cr.dtz.dev
username: apikey
password: ${{ secrets.DTZ_API_KEY }}
- name: uploading image to ee8h25d0.cr.dtz.dev
run: |
docker push ee8h25d0.cr.dtz.dev/sample-website:latest
- name: Resolve image digest
id: resolve_digest
run: |
DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ee8h25d0.cr.dtz.dev/sample-website:latest)
echo "IMAGE_URL=$DIGEST" >> $GITHUB_ENV
- name: Deploy latest image to service
uses: DownToZero-Cloud/containers-service-update@main
with:
container_image: ${{ env.IMAGE_URL }}
container_image_version: ''
api_key: ${{ secrets.DTZ_API_KEY }}
service_id: service-0194e6d9
- name: Publish image URL to summary
run: |
echo "## Deployed image" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "${IMAGE_URL}" >> $GITHUB_STEP_SUMMARY
This pipeline:
By integrating the DTZ GitHub Action into your CI/CD pipelines, you gain a faster, more efficient, and resource-conscious way to manage container deployments. This approach removes the guesswork of polling, ensures precise deployments, and reflects our mission at DownToZero: removing waste at every step.