prefapp / firestarter-workflows

Repository with all firestarter workflows
0 stars 0 forks source link

Create and upgrade make_dispatches workflow #70

Closed juanjosevazquezgil closed 1 month ago

juanjosevazquezgil commented 2 months ago

Motivation

We want to make a make_dispatches workflow that is both reusable and manually callable, so that our other workflows can use it and users can dispatch images without building them from scratch when needed. To this end, the following workflow inputs are proposed:

name: Make dispatches

on:
  workflow_dispatch:
    type:
      type: choice
      description: Dispatches to make (releases, snapshots or both)
      options:
        - *
        - releases
        - snapshots
      required: true
      default: *
    flavor:
      type: string 
      description: Filter dispatches based on flavor (one (alone), several(separated by commas) or * (all))
      required: true
      default: "default"
    state-repo:
      type: string
      description: Filter dispatches based on state repos of the flavor (one (alone), several(separated by commas) or * (all))
      required: true
      default: "*"
    # If specified, only this image will be calculated and dispatched (deployment_dispatch is not used, we calculate it inside this workflow)
    version:
      type: string
      description: Release tag or sha commit
      required: false
      default: ""

jobs:
  <job that calls make_dispatches with the user's input, when version is not specified>

  <job that calculates and dispatches the version specified by the user, the dispatches it>

Some changes to the make_dispatches action may be needed

Acceptance criteria