From f939fe6dea25fed202c818ecfa3b4d0eceea5259 Mon Sep 17 00:00:00 2001 From: Roman Pytkov Date: Mon, 27 Oct 2025 23:29:57 +0300 Subject: [PATCH] =?UTF-8?q?workflow=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=B1?= =?UTF-8?q?=D0=BE=D1=80=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-and-push.yaml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/build-and-push.yaml diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml new file mode 100644 index 0000000..87e7c83 --- /dev/null +++ b/.gitea/workflows/build-and-push.yaml @@ -0,0 +1,45 @@ +name: Build and Push Docker Images + +on: + push: + branches: [ master ] + +env: + REGISTRY: git.nullptr.top + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + service: [ gateway, worker ] + include: + - service: gateway + dockerfile: src/LiquidCode.Tester.Gateway/Dockerfile + image: git.nullptr.top/liquidcode/liquidcode-tester-gateway + - service: worker + dockerfile: src/LiquidCode.Tester.Worker/Dockerfile + image: git.nullptr.top/liquidcode/liquidcode-tester-worker + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: liquidcode-ci-service + password: ${{ secrets.SERVICE_ACCOUNT_TOKEN }} + + - name: Build and Push ${{ matrix.service }} image + uses: docker/build-push-action@v6 + with: + context: . + file: ${{ matrix.dockerfile }} + push: true + tags: ${{ matrix.image }}:latest,${{ matrix.image }}:${{ gitea.sha }} + cache-from: type=registry,ref=${{ matrix.image }}:buildcache + cache-to: type=registry,ref=${{ matrix.image }}:buildcache,mode=max