From 7e2a6604dd45361c9bbbca78510aea4226a29e54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= <jiri@stefka.eu>
Date: Tue, 17 Oct 2023 13:46:30 +0200
Subject: [PATCH 1/2] docs: Remove obsolete badges

---
 README.md | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/README.md b/README.md
index ab7cff4..d771628 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,6 @@
 [![Docker Stars](https://img.shields.io/docker/stars/jiriks74/onlyoffice-documentserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver)
 [![Docker Size](https://img.shields.io/docker/image-size/jiriks74/onlyoffice-documentserver/latest.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Size&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver)
 
-[![GitHub Stars](https://img.shields.io/github/stars/jiriks74/Docker-DocumentServer.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/jiriks74/Docker-DocumentServer)
-[![GitHub Forks](https://img.shields.io/github/forks/jiriks74/Docker-DocumentServer?color=94398d&label=Forks&logo=github&logoColor=ffffff&style=for-the-badge)](https://github.com/jiriks74/Docker-DocumentServer)
-
 #### This repository is based on the official `Dockerfile` and `docker-compose.yml` files with all the needed files as well
 
 # Table of contents

From d800394eb9e7845fc9ebfc3208964712ff48e73f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= <jiri@stefka.eu>
Date: Tue, 17 Oct 2023 13:46:52 +0200
Subject: [PATCH 2/2] feat(ci/cd): Automatically build image, archive upstream
 workflows

---
 {.github => .gitea}/ISSUE_TEMPLATE.md         |  0
 .../workflows/4testing-build.yml.arch         |  0
 .gitea/workflows/build.yml                    | 48 +++++++++++++++++++
 .../workflows/stable-build.yml.arch           |  0
 4 files changed, 48 insertions(+)
 rename {.github => .gitea}/ISSUE_TEMPLATE.md (100%)
 rename .github/workflows/4testing-build.yml => .gitea/workflows/4testing-build.yml.arch (100%)
 create mode 100644 .gitea/workflows/build.yml
 rename .github/workflows/stable-build.yml => .gitea/workflows/stable-build.yml.arch (100%)

diff --git a/.github/ISSUE_TEMPLATE.md b/.gitea/ISSUE_TEMPLATE.md
similarity index 100%
rename from .github/ISSUE_TEMPLATE.md
rename to .gitea/ISSUE_TEMPLATE.md
diff --git a/.github/workflows/4testing-build.yml b/.gitea/workflows/4testing-build.yml.arch
similarity index 100%
rename from .github/workflows/4testing-build.yml
rename to .gitea/workflows/4testing-build.yml.arch
diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml
new file mode 100644
index 0000000..fcb635a
--- /dev/null
+++ b/.gitea/workflows/build.yml
@@ -0,0 +1,48 @@
+name: Build
+
+on:
+  schedule:
+    - cron: "0 0 * * 1"
+
+jobs:
+  build:
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Extract Version Tag
+        id: extract-version
+        run: |
+          git clone https://github.com/ONLYOFFICE/DocumentServer
+          cd DocumentServer
+          echo "docker_tag=$(git describe --tags --abbrev=0 | cut -d 'v' -f2-") >> GITHUB_OUTPUT
+          cd .. && rm -rf DocumentServer
+        shell: bash
+      
+      - name: Install Docker
+        run: |
+          apt-get update
+          apt-get install docker.io -y          
+
+      - name: Login to DockerHub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v2
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+        with:
+          # driver-opts: network=host
+          platforms: linux/amd64,linux/arm64
+
+      - name: Build and push image
+        uses: docker/build-push-action@v2
+        with:
+          push: true
+          tags: jiriks74/onlyoffice-documentserver:${{ steps.extract-version.outputs.docker_tag }},jiriks74/onlyoffice-documentserver:latest
+          platforms: linux/amd64,linux/arm64
+          context: .
+          file: ./Dockerfile
diff --git a/.github/workflows/stable-build.yml b/.gitea/workflows/stable-build.yml.arch
similarity index 100%
rename from .github/workflows/stable-build.yml
rename to .gitea/workflows/stable-build.yml.arch