53 lines
1.3 KiB
Markdown
53 lines
1.3 KiB
Markdown
# packages
|
|
|
|
Gitea Actions-based Debian package builder for custom apt repository.
|
|
|
|
## Structure
|
|
|
|
```
|
|
packages/
|
|
├── .gitea/workflows/build.yml # CI pipeline
|
|
├── scripts/publish.sh # manual publish helper
|
|
└── v2ray/
|
|
├── nfpm.yaml # package definition
|
|
└── scripts/
|
|
├── postinstall.sh
|
|
└── preremove.sh
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Automatic build
|
|
|
|
Push changes to `v2ray/` directory → triggers build automatically.
|
|
|
|
### Manual build with specific version
|
|
|
|
Gitea → Actions → Build packages → Run workflow → specify version.
|
|
|
|
### Add repository on servers
|
|
|
|
```bash
|
|
curl https://git.nakolenke.org/api/packages/nakolenke-pub/debian/repository.key \
|
|
-o /etc/apt/keyrings/nakolenke.asc
|
|
|
|
echo "deb [signed-by=/etc/apt/keyrings/nakolenke.asc] \
|
|
https://git.nakolenke.org/api/packages/nakolenke-pub/debian trixie main" \
|
|
> /etc/apt/sources.list.d/nakolenke.list
|
|
|
|
apt update
|
|
apt install v2ray
|
|
```
|
|
|
|
## Secrets
|
|
|
|
Set `GITEA_TOKEN` in repository secrets (Settings → Secrets).
|
|
Token needs `package` scope.
|
|
|
|
## Adding new package
|
|
|
|
1. Create directory `<package>/`
|
|
2. Add `nfpm.yaml`
|
|
3. Add `scripts/postinstall.sh` and `scripts/preremove.sh`
|
|
4. Add job to `.gitea/workflows/build.yml`
|