feature test
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
name: Build packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
@ -14,25 +12,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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
|
||||
if: env.PKG != ''
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
echo "Building: $PKG"
|
||||
make -C $PKG all publish
|
||||
make -C ${{ github.event.inputs.package }} all publish
|
||||
|
||||
Reference in New Issue
Block a user