feature test

This commit is contained in:
paltovkone
2026-03-07 19:49:20 +04:00
parent 3a7a70738e
commit 8f561a8de2

View File

@ -1,34 +1,25 @@
name: Build packages
on:
push:
branches: [main]
workflow_dispatch:
inputs:
package:
description: 'Package name'
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
PKG: ${{ github.event.inputs.package }}
steps:
- uses: actions/checkout@v4
- name: Read version
run: |
echo "VERSION=$(cat ${{ github.event.inputs.package }}/VERSION | tr -d '[:space:]')" >> $GITHUB_ENV
echo "VERSION=$(cat ${PKG}/VERSION | tr -d '[:space:]')" >> $GITHUB_ENV
- name: Download upstream
run: |
echo "PKG=${{ github.event.inputs.package }}"
echo "VERSION=${{ env.VERSION }}"
ls -la
bash "${PKG}/scripts/download.sh" "$VERSION"
- name: Build deb
run: |
docker run --rm \
-v "$PWD/${{ github.event.inputs.package }}:/work" \
-v "$PWD/${PKG}:/work" \
-w /work \
-e VERSION="${{ env.VERSION }}" \
-e VERSION="$VERSION" \
goreleaser/nfpm package \
--config nfpm.yaml \
--target /work \
@ -36,7 +27,7 @@ jobs:
- name: Publish
run: |
DEB=$(ls ${{ github.event.inputs.package }}/*.deb | head -1)
DEB=$(ls ${PKG}/*.deb | head -1)
HTTP_CODE=$(curl -s -o /tmp/resp.txt -w "%{http_code}" \
--user "andrew:${{ secrets.GITEA_TOKEN }}" \
--upload-file "$DEB" \