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: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
PKG: ${{ github.event.inputs.package }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Read version - name: Read version
run: | 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 - name: Download upstream
run: | run: |
echo "PKG=${{ github.event.inputs.package }}" bash "${PKG}/scripts/download.sh" "$VERSION"
echo "VERSION=${{ env.VERSION }}"
ls -la
- name: Build deb - name: Build deb
run: | run: |
docker run --rm \ docker run --rm \
-v "$PWD/${{ github.event.inputs.package }}:/work" \ -v "$PWD/${PKG}:/work" \
-w /work \ -w /work \
-e VERSION="${{ env.VERSION }}" \ -e VERSION="$VERSION" \
goreleaser/nfpm package \ goreleaser/nfpm package \
--config nfpm.yaml \ --config nfpm.yaml \
--target /work \ --target /work \
@ -36,7 +27,7 @@ jobs:
- name: Publish - name: Publish
run: | 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}" \ HTTP_CODE=$(curl -s -o /tmp/resp.txt -w "%{http_code}" \
--user "andrew:${{ secrets.GITEA_TOKEN }}" \ --user "andrew:${{ secrets.GITEA_TOKEN }}" \
--upload-file "$DEB" \ --upload-file "$DEB" \