From f4a2492b845a9502f5769c223a9c3d45b007cfe1 Mon Sep 17 00:00:00 2001 From: Evgenii Morozov Date: Fri, 1 May 2026 12:57:21 +0300 Subject: [PATCH] Add Gitea Actions workflow to publish image to internal registry Builds linux/amd64 + linux/arm64 on push to main and monthly, pushes to gitea.technocloud.ee/technocloud-public/docker-state-exporter:latest. Mirrors the pattern used by the other technocloud-services projects. --- .gitea/workflows/build.yml | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..00963f7 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,52 @@ +name: Build Docker Image + +on: + push: + branches: + - main + schedule: + - cron: '@monthly' + +jobs: + build-and-deploy-image: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + env: + DOCKER_ORG: technocloud-public + DOCKER_LATEST: latest + RUNNER_TOOL_CACHE: /toolcache + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + github-server-url: https://gitea.technocloud.ee + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + with: + platforms: linux/amd64,linux/arm64 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + registry: gitea.technocloud.ee + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Get Meta + id: meta + run: | + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}