actions-runner/.forgejo/workflows/uptime-kuma.yml

34 lines
1.2 KiB
YAML

on:
workflow_dispatch:
inputs:
uptime_kuma_version:
description: "Tag or Branch to use from uptime-kuma"
required: true
type: string
jobs:
package:
runs-on: docker
container:
image: docker.io/node:22-alpine
steps:
- name: install needed packages
run: apk update && apk add --no-cache git curl
- name: clone repo
run: git clone -b "${{ inputs.uptime_kuma_version }}" --single-branch --depth 1 https://git.fucktheforce.de/mirror/uptime-kuma.git workdir
- name: install dependencies for build
run: npm ci
working-directory: workdir
- name: build
run: npm run build
working-directory: workdir
- name: remove unused folders
run: rm -rf node_modules .git
working-directory: workdir
- name: create package
run: tar czf /dist.tar.gz .
working-directory: workdir
- name: upload package
run: |
curl -H "Authorization: token ${{ secrets.LOOKSHE_PACKAGES_TOKEN }}" --upload-file "/dist.tar.gz" "https://git.fucktheforce.de/api/packages/lookshe/generic/uptime-kuma/${{ inputs.uptime_kuma_version }}/dist.tar.gz"