Skip to content

Renovate workflow: bot edits of the dashboard issue re-trigger Renovate (defective if: gate) #1454

Description

@marcusrbrown

Problem

The Renovate caller (.github/workflows/renovate.yaml) has a defective job condition:

if: >
  (github.event.action == 'edited' && !contains(github.actor, '[bot]')) ||
  (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')

The second clause is true for every event other than workflow_run, so the non-bot check in the first clause never gates anything. A Renovate bot edit of the dashboard issue (checking or unchecking a box) re-triggers Renovate.

Fix

Three disjoint branches — edits require a non-bot actor, push and dispatch always run, workflow_run requires a successful conclusion:

# Edits (dashboard checkbox) run only for non-bot actors; pushes and
# dispatches always run; workflow_run runs only after a successful CI.
if: >
  (github.event.action == 'edited' && !contains(github.actor, '[bot]')) ||
  (github.event.action != 'edited' && github.event_name != 'workflow_run') ||
  (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')

Landed in marcusrbrown/panthea#25 (reviewed there). actionlint passes on the replacement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions