This commit is contained in:
@ -1,21 +1,35 @@
|
||||
name: Build packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
description: 'Package name'
|
||||
required: true
|
||||
description: 'Package name (leave empty for all)'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:24.04
|
||||
strategy:
|
||||
matrix:
|
||||
package: [v2ray] # просто добавляешь сюда новые пакеты
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build and publish
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Skip if not needed
|
||||
id: check
|
||||
run: |
|
||||
docker info || echo "NO DOCKER"
|
||||
make -C ${{ github.event.inputs.package }} fetch
|
||||
make -C ${{ github.event.inputs.package }} build publish
|
||||
if [ -n "${{ github.event.inputs.package }}" ] && \
|
||||
[ "${{ github.event.inputs.package }}" != "${{ matrix.package }}" ]; then
|
||||
echo "SKIP=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build and publish
|
||||
if: env.SKIP != 'true'
|
||||
run: |
|
||||
echo "Building ${{ matrix.package }}"
|
||||
|
||||
Reference in New Issue
Block a user