Renovate #1600
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Renovate | |
| on: | |
| # Enable manual workflow trigger with optional repository filter input | |
| workflow_dispatch: | |
| inputs: | |
| autodiscover_filter: | |
| description: 'Repository filter pattern (e.g., workleap/[a-f]*)' | |
| required: false | |
| default: 'workleap/*' | |
| pull_request: | |
| paths: | |
| - .github/workflows/renovate.yml | |
| - .github/workflows/reusable-renovate-workflow.yml | |
| - renovate.cli.json | |
| schedule: | |
| - cron: "0 1 * * *" # Schedule 1: ov-* repos at 1:00 AM | |
| - cron: "0 2 * * *" # Schedule 2: sg-* repos at 2:00 AM | |
| - cron: "0 3 * * *" # Schedule 3: wlp-* repos at 3:00 AM | |
| - cron: "0 4 * * *" # Schedule 4: wl-[a-h]* repos at 4:00 AM | |
| - cron: "0 5 * * *" # Schedule 5: wl-[i-s]* repos at 5:00 AM | |
| - cron: "0 6 * * *" # Schedule 6: wl-t* repos at 6:00 AM | |
| - cron: "0 7 * * *" # Schedule 7: wl-[u-z]* repos at 7:00 AM | |
| - cron: "0 8 * * *" # Schedule 8: All other repos at 8:00 AM | |
| jobs: | |
| determine-filter: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| filter: ${{ steps.set-filter.outputs.filter }} | |
| steps: | |
| - name: Determine repository filter based on schedule | |
| id: set-filter | |
| shell: pwsh | |
| run: | | |
| if ("${{ github.event_name }}" -eq "workflow_dispatch") { | |
| "filter=${{ github.event.inputs.autodiscover_filter }}" >> $env:GITHUB_OUTPUT | |
| } elseif ("${{ github.event_name }}" -eq "pull_request") { | |
| "filter=workleap/wl-*" >> $env:GITHUB_OUTPUT | |
| } else { | |
| # Determine filter based on scheduled cron expression | |
| $schedule = "${{ github.event.schedule }}" | |
| switch ($schedule) { | |
| "0 1 * * *" { "filter=workleap/ov-*" >> $env:GITHUB_OUTPUT } | |
| "0 2 * * *" { "filter=workleap/sg-*" >> $env:GITHUB_OUTPUT } | |
| "0 3 * * *" { "filter=workleap/wlp-*" >> $env:GITHUB_OUTPUT } | |
| "0 4 * * *" { "filter=/^workleap\/wl-[a-h].*$/" >> $env:GITHUB_OUTPUT } | |
| "0 5 * * *" { "filter=/^workleap\/wl-[i-s].*$/" >> $env:GITHUB_OUTPUT } | |
| "0 6 * * *" { "filter=/^workleap\/wl-t.*$/" >> $env:GITHUB_OUTPUT } | |
| "0 7 * * *" { "filter=/^workleap\/wl-[u-z].*$/" >> $env:GITHUB_OUTPUT } | |
| # Exclude terraform-*-enterprise-* and terraform-*-vertical-* (handled by renovate-terraform.json) | |
| # Exclude wl-terraform-* (handled by renovate-terraform-infra.json) | |
| "0 8 * * *" { "filter=workleap/!(ov-*|sg-*|wlp-*|wl-*|terraform-*-enterprise-*|terraform-*-vertical-*)" >> $env:GITHUB_OUTPUT } | |
| default { throw "Unexpected schedule: $schedule" } | |
| } | |
| } | |
| renovate: | |
| needs: determine-filter | |
| uses: ./.github/workflows/reusable-renovate-workflow.yml | |
| permissions: | |
| id-token: write | |
| contents: read | |
| secrets: inherit | |
| with: | |
| workflow_name: "Renovate" | |
| config_file: "renovate.cli.json" | |
| log_file: "renovate.log" | |
| autodiscover_filter: ${{ needs.determine-filter.outputs.filter }} |