springernature / halfpipe

CLI for interacting with halfpipe
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

support "update-pipeline" in github actions #209

Closed robwhitby closed 1 year ago

robwhitby commented 1 year ago

The actions renderer currently ignores the update-pipeline feature. This means that the halfpipe manifest and workflow have to be kept in sync manually with the halfpipe cli.

Implementing update-pipeline will be different to Concourse as in Actions the workflow is also committed to the git repo.

Option 1: Add an initial job like in Concourse

flowchart LR
    A[Git push]-->|workflow triggered|B[Update job - run halfpipe]
    B --> C{Workflow has changes?}
    C -->|Yes| D[Commit changes]
    C -->|No| E[Run rest of jobs]
    D -.-> A

What happens when updating workflow fails? e.g. merge conflicts

Option 2: Separate workflow

An extra workflow that only triggers on changes to the halfpipe manifest and updates the workflow.

problem: the main workflow would also run, so it would need to be cancelled if the halfpipe manifest and workflow are out of sync.