From 50784a6ab5675ed3317da28630aca27c164809da Mon Sep 17 00:00:00 2001 From: ngn Date: Mon, 12 May 2025 23:19:55 +0300 Subject: [PATCH] add ups workflow and config Signed-off-by: ngn --- .gitea/workflows/{build.yml => docker.yml} | 18 ++++++++++------ .gitea/workflows/ups.yml | 25 ++++++++++++++++++++++ README.md | 8 ++++--- ups.json | 5 +++++ 4 files changed, 47 insertions(+), 9 deletions(-) rename .gitea/workflows/{build.yml => docker.yml} (63%) create mode 100644 .gitea/workflows/ups.yml create mode 100644 ups.json diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/docker.yml similarity index 63% rename from .gitea/workflows/build.yml rename to .gitea/workflows/docker.yml index a1077ba..9856bb8 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/docker.yml @@ -1,28 +1,34 @@ -name: Build and publish the docker image +name: docker on: push: - branches: ["custom"] + branches: + - "main" + paths-ignore: + - "README.md" + - "LICENSE.txt" + - "docker-compose.example.yml" + - "ups.json" env: REGISTRY: git.ngn.tf IMAGE: ${{gitea.repository}} jobs: - build: + docker: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: "https://github.com/actions/checkout@v4" + uses: actions/checkout@v4 - name: Login to container repo - uses: "https://github.com/docker/login-action@v1" + uses: docker/login-action@v1 with: registry: ${{env.REGISTRY}} username: ${{gitea.actor}} password: ${{secrets.PACKAGES_TOKEN}} - - name: Build image + - name: Build docker image run: | docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest diff --git a/.gitea/workflows/ups.yml b/.gitea/workflows/ups.yml new file mode 100644 index 0000000..d4f2dfe --- /dev/null +++ b/.gitea/workflows/ups.yml @@ -0,0 +1,25 @@ +name: ups + +on: + schedule: + - cron: "@weekly" + +jobs: + ups: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt update -y + sudo apt install -y python3 python3-build python3-requests make + + - name: Install ups + run: | + git clone https://git.ngn.tf/ngn/ups && cd ups + make && make install + + - name: Run ups + run: PATH=~/.local/bin:$PATH ups-check diff --git a/README.md b/README.md index 670435c..0ffc902 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -# [ngn.tf] | dumb +# dumb - frontend for Genius -![](https://git.ngn.tf/ngn/dumb/actions/workflows/build.yml/badge.svg) +![](https://git.ngn.tf/ngn/dumb/actions/workflows/docker.yml/badge.svg) +![](https://git.ngn.tf/ngn/dumb/actions/workflows/ups.yml/badge.svg) -A fork of the [dumb](https://github.com/rramiachraf/dumb) project, with my personal changes. +A fork of the [dumb](https://github.com/rramiachraf/dumb) project, with my +personal changes. diff --git a/ups.json b/ups.json new file mode 100644 index 0000000..af7a0bf --- /dev/null +++ b/ups.json @@ -0,0 +1,5 @@ +{ + "upstream": "https://github.com/rramiachraf/dumb", + "provider": "gitea", + "commit": "9e307b7da4fde38b23c8f86ef5c1bd560841ba04" +}