From 3d3b0a86a824512b5bf89b0b8e3bd9837f927b15 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Sat, 20 Dec 2025 06:39:33 +0100 Subject: Move build to Gitea --- .gitea/workflows/main.yml | 80 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .gitea/workflows/main.yml (limited to '.gitea/workflows') diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml new file mode 100644 index 0000000..25f2393 --- /dev/null +++ b/.gitea/workflows/main.yml @@ -0,0 +1,80 @@ +name: Build and Push Docker Image +on: + push: {} + pull_request: {} + schedule: + - cron: '0 */6 * * *' + workflow_dispatch: {} + +jobs: + find-latest-version: + runs-on: ubuntu-latest + container: + image: gitea.segundo.io/docker/ci-base:latest + credentials: + username: "${GITEA_REGISTRY_TOKEN}" + password: "${GITEA_REGISTRY_USER}" + outputs: + lt-version: ${{ steps.find-lt-version.outputs.lt-version }} + steps: + - uses: actions/checkout@v5 + - id: find-lt-version + run: | + curl --silent --fail https://languagetool.org/download/ | + grep -o 'href=".*">' | + grep -Po '="\K[^"]+' | + grep -Po 'LanguageTool-\K\d\.\d+' | + sort -V | + tail -n 1 | + xargs -I {} echo "lt-version={}" >> $GITHUB_OUTPUT + + check: + runs-on: ubuntu-latest + container: ghcr.io/super-linter/super-linter:latest + steps: + - uses: actions/checkout@v5 + - run: | + bash .scripts.d/10-check.sh + + build: + runs-on: ubuntu-latest + needs: [find-latest-version, check] + env: + LT_VERSION: ${{ needs.find-latest-version.outputs.lt-version }} + container: + image: gitea.segundo.io/docker/ci-base:latest + credentials: + username: "${GITEA_REGISTRY_TOKEN}" + password: "${GITEA_REGISTRY_USER}" + steps: + - uses: actions/checkout@v5 + - run: | + bash .scripts.d/20-build.sh + + test: + runs-on: ubuntu-latest + needs: build + container: + image: gitea.segundo.io/docker/ci-base:latest + credentials: + username: "${GITEA_REGISTRY_TOKEN}" + password: "${GITEA_REGISTRY_USER}" + steps: + - uses: actions/checkout@v5 + - run: | + bash .scripts.d/30-test.sh + + publish: + runs-on: ubuntu-latest + needs: [find-latest-version, test] + env: + LT_VERSION: ${{ needs.find-latest-version.outputs.lt-version }} + container: + image: gitea.segundo.io/docker/ci-base:latest + credentials: + username: "${GITEA_REGISTRY_TOKEN}" + password: "${GITEA_REGISTRY_USER}" + steps: + - uses: actions/checkout@v5 + - run: | + bash .scripts.d/40-publish.sh -- cgit v1.2.3