From 89f88e24eabb0a4c20ae8dcaeaa21995a87e1911 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Mon, 14 Jul 2025 16:36:24 -0500 Subject: [PATCH] Add build and push for rootless Docker image in CI workflow. --- .github/workflows/docker.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b83dd51..cf305f5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -59,4 +59,28 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max + + - name: Extract metadata (tags, labels) for Docker (rootless) + id: meta_rootless + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-rootless + tags: | + type=raw,value=latest-rootless,enable={{is_default_branch}} + type=ref,event=branch,prefix=,suffix=-rootless,enable={{is_default_branch}} + type=semver,pattern={{version}},suffix=-rootless + type=semver,pattern={{major}}.{{minor}},suffix=-rootless + type=sha,format=short,suffix=-rootless + + - name: Build and push rootless Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile.rootless + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta_rootless.outputs.tags }} + labels: ${{ steps.meta_rootless.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max