aboutsummaryrefslogtreecommitdiff
path: root/.gitea/workflows/main.yml
diff options
context:
space:
mode:
authorChristian Segundo2025-12-20 06:39:33 +0100
committerChristian Segundo2025-12-20 13:00:19 +0100
commit3d3b0a86a824512b5bf89b0b8e3bd9837f927b15 (patch)
tree78f2a1fbecf69c4084b98090ce6ba8b3f98ce3ce /.gitea/workflows/main.yml
parenta575e280350013f1c5fc837af38bf268c9172b42 (diff)
downloadlanguagetool-3d3b0a86a824512b5bf89b0b8e3bd9837f927b15.tar.gz
Move build to Gitea
Diffstat (limited to '.gitea/workflows/main.yml')
-rw-r--r--.gitea/workflows/main.yml80
1 files changed, 80 insertions, 0 deletions
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