We want to add a new parameter to the action's config file, to allow specify if a flavor should be built by default, i.e. when an * is passed as the flavors input (or no flavors input is set), through the automatic dispatches.
If the new auto config option is set to true (by default is set to false), the corresponding image flavors will be built when the * is passed as the flavors inputs (or no flavors input is specified)
In this way, the features build_xxx workflows would build, by default (i.e. flavors=*) those images marked as auto: true.
If we trigger the build_xxx workflow manually, the flavors to build should be specified, and the auto flag will not be taken into account. If we specify an * in the flavors to build, we need an extra option to the cli (--skip_auto or --force) to indicate that we don't want to take into account the state of the auto flag.
on:
workflow_dispatch:
inputs:
from:
type: string
description: Origin commit or tag
required: true
default: 'master'
flavors:
type: string
description: Flavor name/s | one (alone), several(separated by commas)
required: true
default: "*"
skip_auto:
type: boolean
description: Trigger the build of all the flavors specified, without taking into account the state of the auto flag
required: false
choice:
- true
- false
Motivation
We want to add a new parameter to the action's config file, to allow specify if a flavor should be built by default, i.e. when an
*
is passed as the flavors input (or no flavors input is set), through the automatic dispatches.If the new
auto
config option is set totrue
(by default is set tofalse
), the corresponding image flavors will be built when the*
is passed as the flavors inputs (or no flavors input is specified)In this way, the features
build_xxx
workflows would build, by default (i.e.flavors=*
) those images marked asauto: true
.If we trigger the build_xxx workflow manually, the flavors to build should be specified, and the auto flag will not be taken into account. If we specify an
*
in the flavors to build, we need an extra option to the cli (--skip_auto
or--force
) to indicate that we don't want to take into account the state of the auto flag.https://github.com/prefapp/features/blob/main/packages/build_images/templates/.github/workflows/build_snapshots.yaml