From 5bf218354ba1cfe1a7bcc10d6fa366192df67ff4 Mon Sep 17 00:00:00 2001 From: Jonas Baumann Date: Mon, 15 Jul 2024 12:01:26 +0200 Subject: [PATCH] Build docker images on lotus. --- .github/workflows/docker-image.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8eb16656b43..59373c1859f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,12 +2,14 @@ name: Build Docker image on: push: + branches: + - '**' tags: - '*.*.*' jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v3 @@ -31,7 +33,10 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 + with: + driver: remote + endpoint: tcp://buildkitd.buildx:1234 - name: Login to DockerHub uses: docker/login-action@v2 @@ -47,6 +52,7 @@ jobs: 4teamwork/ogcore tags: | type=pep440,pattern={{version}} + type=sha - name: Build and push ogcore uses: docker/build-push-action@v3 @@ -54,7 +60,7 @@ jobs: context: . file: ./docker/core/Dockerfile platforms: linux/amd64,linux/arm64 - push: true + push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: ${{ steps.meta_ogcore.outputs.tags }} labels: ${{ steps.meta_ogcore.outputs.labels }} cache-from: type=gha,scope=ogcore