ci: Add full control panel for manual workflow dispatching.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
47
.github/workflows/package.yml
vendored
47
.github/workflows/package.yml
vendored
@@ -38,20 +38,36 @@ on:
|
||||
release_url:
|
||||
type: string
|
||||
description: For release assets
|
||||
build_pkgs:
|
||||
checkout:
|
||||
type: string
|
||||
default: 'HEAD'
|
||||
enable_book:
|
||||
type: string
|
||||
default: 'true'
|
||||
check_pkgs:
|
||||
type: string
|
||||
default: 'false'
|
||||
build_nix:
|
||||
enable_binary:
|
||||
type: string
|
||||
default: 'true'
|
||||
enable_container:
|
||||
type: string
|
||||
default: 'true'
|
||||
enable_distro:
|
||||
type: string
|
||||
default: 'true'
|
||||
enable_checks:
|
||||
type: string
|
||||
default: 'true'
|
||||
containers:
|
||||
type: string
|
||||
default: '[]'
|
||||
distros:
|
||||
type: string
|
||||
default: '[]'
|
||||
|
||||
jobs:
|
||||
book:
|
||||
if: >
|
||||
!failure() && !cancelled()
|
||||
&& fromJSON(inputs.enable_book)
|
||||
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
|
||||
&& contains(fromJSON(inputs.feat_sets), fromJSON('["default"]')[0])
|
||||
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
||||
@@ -73,6 +89,7 @@ jobs:
|
||||
excludes: ${{inputs.excludes}}
|
||||
includes: ${{inputs.includes}}
|
||||
release_url: ${{inputs.release_url}}
|
||||
checkout: ${{inputs.checkout}}
|
||||
artifact: >
|
||||
{
|
||||
"book": {
|
||||
@@ -85,6 +102,7 @@ jobs:
|
||||
binary:
|
||||
if: >
|
||||
!failure() && !cancelled()
|
||||
&& fromJSON(inputs.enable_binary)
|
||||
|
||||
name: Binaries
|
||||
uses: ./.github/workflows/bake.yml
|
||||
@@ -101,6 +119,7 @@ jobs:
|
||||
excludes: ${{inputs.excludes}}
|
||||
includes: ${{inputs.includes}}
|
||||
release_url: ${{inputs.release_url}}
|
||||
checkout: ${{inputs.checkout}}
|
||||
artifact: >
|
||||
{
|
||||
"static": {
|
||||
@@ -115,11 +134,12 @@ jobs:
|
||||
container:
|
||||
if: >
|
||||
!failure() && !cancelled()
|
||||
&& fromJSON(inputs.enable_container)
|
||||
|
||||
name: Containers
|
||||
uses: ./.github/workflows/bake.yml
|
||||
with:
|
||||
bake_targets: '["docker", "oci"]'
|
||||
bake_targets: ${{inputs.containers}}
|
||||
cargo_profiles: ${{inputs.cargo_profiles}}
|
||||
feat_sets: ${{inputs.feat_sets}}
|
||||
rust_toolchains: ${{inputs.rust_toolchains}}
|
||||
@@ -131,6 +151,7 @@ jobs:
|
||||
excludes: ${{inputs.excludes}}
|
||||
includes: ${{inputs.includes}}
|
||||
release_url: ${{inputs.release_url}}
|
||||
checkout: ${{inputs.checkout}}
|
||||
artifact: >
|
||||
{
|
||||
"docker": {
|
||||
@@ -147,18 +168,18 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
pkgs:
|
||||
distro:
|
||||
if: >
|
||||
!failure() && !cancelled()
|
||||
&& fromJSON(inputs.enable_distro)
|
||||
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
|
||||
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
|
||||
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
||||
&& fromJSON(inputs.build_pkgs)
|
||||
|
||||
name: Distro Packages
|
||||
uses: ./.github/workflows/bake.yml
|
||||
with:
|
||||
bake_targets: '["deb", "rpm", "nix"]'
|
||||
bake_targets: ${{inputs.distros}}
|
||||
cargo_profiles: '["release"]'
|
||||
feat_sets: '["all"]'
|
||||
rust_toolchains: '["stable"]'
|
||||
@@ -170,6 +191,7 @@ jobs:
|
||||
excludes: ${{inputs.excludes}}
|
||||
includes: ${{inputs.includes}}
|
||||
release_url: ${{inputs.release_url}}
|
||||
checkout: ${{inputs.checkout}}
|
||||
artifact: >
|
||||
{
|
||||
"deb": {
|
||||
@@ -188,16 +210,16 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
check_pkgs:
|
||||
checks:
|
||||
if: >
|
||||
!failure() && !cancelled()
|
||||
&& fromJSON(inputs.enable_checks)
|
||||
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
|
||||
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
|
||||
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
||||
&& fromJSON(inputs.check_pkgs)
|
||||
|
||||
name: Check Packages
|
||||
needs: [pkgs]
|
||||
needs: [distro]
|
||||
uses: ./.github/workflows/bake.yml
|
||||
with:
|
||||
bake_targets: '["deb-install", "rpm-install"]'
|
||||
@@ -211,3 +233,4 @@ jobs:
|
||||
machines: ${{inputs.machines}}
|
||||
excludes: ${{inputs.excludes}}
|
||||
includes: ${{inputs.includes}}
|
||||
checkout: ${{inputs.checkout}}
|
||||
|
||||
Reference in New Issue
Block a user