Skip to content

Commit

Permalink
feat(renovate): add support for workflow_run triggers (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Oct 29, 2024
1 parent f3920c9 commit 03e6ac8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/healthy-hats-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@bfra.me/.github": minor
---

Add a trigger for `workflow_run` events with the 'success' status.

9 changes: 7 additions & 2 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ name: Renovate
description: Log the fully-resolved Renovate config for each repository, plus fully-resolved presets.
type: boolean
default: false
workflow_run:
branches: [main]
types: [completed]
workflows: [Main]

concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.run_number || github.ref }}
Expand Down Expand Up @@ -95,11 +99,12 @@ jobs:
autodiscover: >-
${{ github.event.repository.name == '.github' && !contains('["issues", "pull_request"]', github.event_name) && github.ref == 'refs/heads/main' }}
dry_run: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
if: github.event_name != 'push' || steps.filter.outputs.changes == 'true'
if: >-
${{ !contains('["push", "workflow_run"]', github.event_name) || github.event.workflow_run.conclusion == 'success' || steps.filter.outputs.changes == 'true' }}
uses: bfra-me/renovate-action@v4
with:
autodiscover: ${{ env.autodiscover }}
branch: ${{ (( env.has_renovate_label == 'true' && github.ref_name != github.event.repository.default_branch ) || env.dry_run == 'true' ) && github.ref_name || '' }}
branch: ${{ (github.ref_name != github.event.repository.default_branch || env.dry_run == 'true') && github.ref_name || '' }}
cache: true
dry-run: ${{ env.dry_run }}
log-level: ${{ inputs.log_level || env.WORKFLOW_LOG_LEVEL }}
Expand Down

0 comments on commit 03e6ac8

Please sign in to comment.