From 45b55a3b12deadbd06a5ebc1ac722c4a4da02b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lo=C5=A1=C5=A5=C3=A1k?= Date: Fri, 27 Mar 2026 04:37:43 +0100 Subject: [PATCH] Added workflow --- .gitea/workflows/docker-tag-build.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/docker-tag-build.yml diff --git a/.gitea/workflows/docker-tag-build.yml b/.gitea/workflows/docker-tag-build.yml new file mode 100644 index 0000000..c3f88e2 --- /dev/null +++ b/.gitea/workflows/docker-tag-build.yml @@ -0,0 +1,41 @@ +name: Build and push Docker image on push + +on: + push: + branches: + - '**' + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set variables + shell: bash + run: | + echo "IMAGE_NAME=gitea.lostak.dev/lostakj/postfix" >> "$GITHUB_ENV" + + - name: Login to Gitea registry + shell: bash + run: | + echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.lostak.dev -u "${{ secrets.REGISTRY_USER }}" --password-stdin + + - name: Create buildx builder + shell: bash + run: | + docker buildx create --name ci-builder --use || docker buildx use ci-builder + docker buildx inspect --bootstrap + + - name: Build and push image + shell: bash + run: | + docker buildx build \ + --platform linux/amd64 \ + -t "${IMAGE_NAME}:latest" \ + --push \ + . \ No newline at end of file