From 316534996aa6d0c037319e23651fd87024586000 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Thu, 15 Jun 2023 05:27:35 +0000 Subject: [PATCH] Build docker image `gitea/act_runner/x.y.z-dind-rootless` (#239) Follow #208 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/239 Reviewed-by: Zettat123 --- .gitea/workflows/release-nightly.yml | 13 +++++++++++++ .gitea/workflows/release-tag.yml | 15 +++++++++++++++ Makefile | 2 +- examples/kubernetes/rootless-docker.yaml | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release-nightly.yml b/.gitea/workflows/release-nightly.yml index b7127ee..053d6c7 100644 --- a/.gitea/workflows/release-nightly.yml +++ b/.gitea/workflows/release-nightly.yml @@ -90,3 +90,16 @@ jobs: tags: | ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + - name: Build and push dind-rootless + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + context: . + file: ./Dockerfile.rootless + platforms: | + linux/amd64 + linux/arm64 + push: true + tags: | + ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}-dind-rootless diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml index fe3be30..e7c1173 100644 --- a/.gitea/workflows/release-tag.yml +++ b/.gitea/workflows/release-tag.yml @@ -101,3 +101,18 @@ jobs: tags: | ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + + - name: Build and push dind-rootless + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + context: . + file: ./Dockerfile.rootless + platforms: | + linux/amd64 + linux/arm64 + push: true + tags: | + ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-dind-rootless + ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}-dind-rootless diff --git a/Makefile b/Makefile index 37ae9e6..2e6c48e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ GOFILES := $(shell find . -type f -name "*.go" -o -name "go.mod" ! -name "genera DOCKER_IMAGE ?= gitea/act_runner DOCKER_TAG ?= nightly DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG) -DOCKER_ROOTLESS_REF := $(DOCKER_IMAGE)_rootless:$(DOCKER_TAG) +DOCKER_ROOTLESS_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)-dind-rootless ifneq ($(shell uname), Darwin) EXTLDFLAGS = -extldflags "-static" $(null) diff --git a/examples/kubernetes/rootless-docker.yaml b/examples/kubernetes/rootless-docker.yaml index 5945bdc..2848e75 100644 --- a/examples/kubernetes/rootless-docker.yaml +++ b/examples/kubernetes/rootless-docker.yaml @@ -43,7 +43,7 @@ spec: claimName: act-runner-vol containers: - name: runner - image: gitea/act_runner:nightly-rootless + image: gitea/act_runner:nightly-dind-rootless imagePullPolicy: Always # command: ["sh", "-c", "while ! nc -z localhost 2376