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