This commit is contained in:
@ -1,6 +1,8 @@
|
|||||||
name: Build packages
|
name: Build packages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
package:
|
package:
|
||||||
@ -12,14 +14,25 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Detect package
|
||||||
|
id: detect
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ github.event.inputs.package }}" ]; then
|
||||||
|
echo "PKG=${{ github.event.inputs.package }}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
PKG=$(git diff --name-only HEAD~1 HEAD | grep -oP '^[^/]+(?=/)' | sort -u | while read dir; do
|
||||||
|
[ -f "$dir/Makefile" ] && echo "$dir"
|
||||||
|
done | head -1)
|
||||||
|
echo "PKG=$PKG" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
|
if: env.PKG != ''
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
make -C ${{ github.event.inputs.package }} \
|
echo "Building: $PKG"
|
||||||
GITEA_USER=andrew \
|
make -C $PKG all publish
|
||||||
GITEA_URL=https://git.nakolenke.org \
|
|
||||||
GITEA_ORG=nakolenke-pub \
|
|
||||||
SUITE=trixie \
|
|
||||||
package publish
|
|
||||||
|
|||||||
Reference in New Issue
Block a user