-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.14 KB
/
codeberg_automatic_update.yaml
File metadata and controls
44 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Codeberg Automatic Update
on:
workflow_dispatch:
schedule:
- cron: "30 22 * * *"
permissions:
contents: read
jobs:
run_cron_codeberg:
runs-on: ubuntu-latest
timeout-minutes: 180
env:
CB_API_KEY: ${{ secrets.CODEBERG_TOKEN }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
API_KEY: ${{ secrets.API_KEY }}
steps:
- name: repo
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
- name: uv sync and install important things
run: |
cd ./src/readme_keyword_extraction
uv sync
uv run uvicorn main:app --host 0.0.0.0 --port 8000 &
- name: wait for 20 seconds before starting, for server to start
run: |
sleep 20
curl http://127.0.0.1:8000/extract_keywords
- name: Download cron-codeberg binary
run: wget -O cron-codeberg https://github.com/Zigistry/database/releases/download/executables/cron-codeberg
- name: Make binary executable
run: chmod +x ./cron-codeberg
- name: Run cron-codeberg
run: ./cron-codeberg