update the ups workflow
Some checks failed
ups / ups (push) Failing after 19s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-05-12 21:33:18 +03:00
parent c414ded50c
commit 0d8d4c09ee
2 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,4 @@
name: build name: docker
on: on:
push: push:
@ -15,20 +15,20 @@ env:
IMAGE: ${{gitea.repository}} IMAGE: ${{gitea.repository}}
jobs: jobs:
build: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: "https://github.com/actions/checkout@v4" uses: actions/checkout@v4
- name: Login to container repo - name: Login to container repo
uses: "https://github.com/docker/login-action@v1" uses: docker/login-action@v1
with: with:
registry: ${{env.REGISTRY}} registry: ${{env.REGISTRY}}
username: ${{gitea.actor}} username: ${{gitea.actor}}
password: ${{secrets.PACKAGES_TOKEN}} password: ${{secrets.PACKAGES_TOKEN}}
- name: Build image - name: Build docker image
run: | run: |
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest

View File

@ -12,14 +12,18 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: "https://github.com/actions/checkout@v4" uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y curl jq python3 python3-requests
- name: Install ups - name: Install ups
run: | run: |
sudo apt update -y version=$(curl -s 'https://git.ngn.tf/api/v1/repos/ngn/ups/releases/latest' | jq -r .tag_name)
sudo apt install -y python3 python3-build python3-requests make wget "https://git.ngn.tf/ngn/ups/releases/download/${version}/ups-${version}-py3-none-any.whl" -O ups.whl
git clone https://git.ngn.tf/ngn/ups && cd ups pip3 install --force-reinstall --break-system-packages ups.whl
make && make install
- name: Run ups - name: Run ups
run: PATH=~/.local/bin:$PATH ups-check run: PATH=~/.local/bin:$PATH ups-check