Skip to content

feat docker: build docker image with zstd compression #12

feat docker: build docker image with zstd compression

feat docker: build docker image with zstd compression #12

name: Build and publish ubuntu-24.04-userver images
'on':
schedule:
- cron: '30 5 * * 6' # Every Saturday at 5:30
workflow_dispatch:
pull_request:
release:
types: [published]
jobs:
build_and_publish_base:
runs-on: ubuntu-24.04
name: Build and publish base images
permissions:
contents: read
packages: write
env:
USERVER_IMAGE_TAG: ${{ github.event.release.tag_name || 'latest' }}
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the ubuntu-24.04-userver-base Docker image
run: |
docker buildx build \
-f scripts/docker/ubuntu-24.04-base.dockerfile \
--output type=image,name=ghcr.io/userver-framework/ubuntu-24.04-userver-base:${USERVER_IMAGE_TAG},oci-mediatypes=true,compression=zstd,force-compression=true,push=true \
.
- name: Build the ubuntu-24.04-userver Docker image
run: |
docker buildx build \
-t ghcr.io/userver-framework/ubuntu-24.04-userver:${USERVER_IMAGE_TAG} \
-f scripts/docker/ubuntu-24.04-userver.dockerfile \
--output type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true \
.
docker push ghcr.io/userver-framework/ubuntu-24.04-userver:${USERVER_IMAGE_TAG}