change build behaviour to support dynamic package selection
This commit is contained in:
@@ -32,6 +32,7 @@ jobs:
|
||||
outputs:
|
||||
packages_selected: "${{ steps.package-selection.outputs.packages_selected }}"
|
||||
selected_packages: "${{ steps.package-selection.outputs.selected_packages }}"
|
||||
build_matrix: "${{ steps.package-selection.outputs.build_matrix }}"
|
||||
greptimedb_selected: "${{ steps.package-selection.outputs.greptimedb_selected }}"
|
||||
steps:
|
||||
- name: Prepare Environment
|
||||
@@ -69,8 +70,7 @@ jobs:
|
||||
timeout-minutes: 180
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: [seaweedfs, greptimedb, lavinmq, gitea, nifi]
|
||||
matrix: ${{ fromJSON(needs.preflight.outputs.build_matrix) }}
|
||||
container:
|
||||
image: "alpine:3.24"
|
||||
env:
|
||||
@@ -87,13 +87,11 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build package
|
||||
if: contains(needs.preflight.outputs.selected_packages, matrix.package)
|
||||
run: |
|
||||
scripts/apk/ci-build.sh
|
||||
scripts/apk/list-packages.sh
|
||||
|
||||
- name: Check artifact upload support
|
||||
if: contains(needs.preflight.outputs.selected_packages, matrix.package)
|
||||
run: |
|
||||
test -n "${ACTIONS_RUNTIME_TOKEN:-}" || {
|
||||
echo "artifact upload support is required for split package builds" >&2
|
||||
@@ -101,7 +99,6 @@ jobs:
|
||||
}
|
||||
|
||||
- name: Upload package artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, matrix.package)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: alpine-package-${{ matrix.package }}-${{ github.sha }}
|
||||
@@ -136,40 +133,10 @@ jobs:
|
||||
scripts/apk/ci-package-cache.sh prepare
|
||||
printf 'ALPINE_PACKAGES=%s\n' "$selected_packages" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Download SeaweedFS artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, 'seaweedfs')
|
||||
- name: Download package artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: alpine-package-seaweedfs-${{ github.sha }}
|
||||
path: packages/worker-artifacts/seaweedfs
|
||||
|
||||
- name: Download GreptimeDB artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, 'greptimedb')
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: alpine-package-greptimedb-${{ github.sha }}
|
||||
path: packages/worker-artifacts/greptimedb
|
||||
|
||||
- name: Download LavinMQ artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, 'lavinmq')
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: alpine-package-lavinmq-${{ github.sha }}
|
||||
path: packages/worker-artifacts/lavinmq
|
||||
|
||||
- name: Download Gitea artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, 'gitea')
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: alpine-package-gitea-${{ github.sha }}
|
||||
path: packages/worker-artifacts/gitea
|
||||
|
||||
- name: Download NiFi artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, 'nifi')
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: alpine-package-nifi-${{ github.sha }}
|
||||
path: packages/worker-artifacts/nifi
|
||||
path: packages/worker-artifacts
|
||||
|
||||
- name: Merge package artifacts
|
||||
run: scripts/apk/merge-ci-artifacts.sh
|
||||
|
||||
Reference in New Issue
Block a user