Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
name: build
|
||||
name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -15,20 +15,20 @@ env:
|
||||
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
|
@ -5,21 +5,25 @@ on:
|
||||
branches:
|
||||
- "custom"
|
||||
schedule:
|
||||
- cron: "@weekly"
|
||||
- cron: "@weekly"
|
||||
|
||||
jobs:
|
||||
ups:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y python3 python3-build python3-requests make
|
||||
git clone https://git.ngn.tf/ngn/ups && cd ups
|
||||
make && make install
|
||||
version=$(curl -s 'https://git.ngn.tf/api/v1/repos/ngn/ups/releases/latest' | jq -r .tag_name)
|
||||
wget "https://git.ngn.tf/ngn/ups/releases/download/${version}/ups-${version}-py3-none-any.whl" -O ups.whl
|
||||
pip3 install --force-reinstall --break-system-packages ups.whl
|
||||
|
||||
- name: Run ups
|
||||
run: PATH=~/.local/bin:$PATH ups-check
|
||||
|
Reference in New Issue
Block a user