Approval step not showing

Hi,

I have an issue where a workflow containing an approval step is not handled correctly when the workflow is triggered by a tag.

Here is an extract of the incriminated yaml (the jobs referenced exists and are defined in the same file):

[...]
workflows:
  version: 2
  one_action:
    jobs:
    - one_action_dry_run:
        filters:
          branches:
            ignore: /.*/
          tags:
            only: /.*/
    - approve_previous_job:
        type: approval
        requires:
        - one_action_dry_run
    - one_action_real_run:
        requires:
        - approve_previous_job
[...]

Expected :
First step one_action_dry_run is triggered when pushing a tag (any tag).
Then someone needs to approve approve_previous_job and finally one_action_real_run run.

Actual :
First step is triggered and that’s all. The workflow is one step only, the last 2 steps are listed in the configuration of the first job but does not appear on the workflow graph.

Note that this workflow use to work when it was triggered by push on a specific branch.

Is there a limitation (known or unknown) for approval steps in workflow triggered by tags ?

Regards

Hi @tgermain, The tag filter needs to configured on each subsequent job. Tags function differently than branches, and are inherited from previous jobs. More on this can be found in our docs on tag filters.

workflows:
  version: 2
  one_action:
    jobs:
    - one_action_dry_run:
        filters:
          branches:
            ignore: /.*/
          tags:
            only: /.*/
    - approve_previous_job:
        type: approval
        requires:
        - one_action_dry_run
        filters:
          tags:
            only: /.*/
    - one_action_real_run:
        requires:
        - approve_previous_job
        filters:
          tags:
            only: /.*/

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.