-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
[build] add renovate dependency workflow #17504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8f754bb
[build] add renovate dependency workflow
titusfortner 7b88946
[build] simplify renovate orchestration and apply renovate.json rules
titusfortner fbe66c1
address review feedback
titusfortner 7895f48
more fixes
titusfortner d644e2d
fix how we are using create-pull-request action
titusfortner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| name: Renovate Dependencies | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| base-ref: | ||
| description: Base branch or ref to update | ||
| required: true | ||
| default: trunk | ||
| type: string | ||
|
|
||
|
titusfortner marked this conversation as resolved.
|
||
| concurrency: | ||
| group: renovate-dependencies | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| reset-update-branch: | ||
| name: Reset temp/bazel-updates to ${{ inputs.base-ref }} | ||
| if: github.event.repository.fork == false | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout base ref | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ inputs.base-ref }} | ||
| token: ${{ secrets.SELENIUM_CI_TOKEN || github.token }} | ||
| - name: Force-push to temp/bazel-updates | ||
| run: git push --force origin "HEAD:temp/bazel-updates" | ||
|
|
||
| prepare-updates: | ||
| name: Prepare Bazel updates | ||
| needs: reset-update-branch | ||
| if: github.event.repository.fork == false | ||
| uses: ./.github/workflows/bazel.yml | ||
| with: | ||
| name: Prepare Bazel updates | ||
| ref: ${{ inputs.base-ref }} | ||
| caching: false | ||
| run: | | ||
| ./go all:update | ||
| ./go rust:update | ||
| artifact-name: bazel-updates | ||
|
|
||
| push-update-branch: | ||
| name: Push Bazel update branch | ||
| needs: prepare-updates | ||
| if: github.event.repository.fork == false | ||
| uses: ./.github/workflows/commit-changes.yml | ||
| with: | ||
| artifact-name: bazel-updates | ||
| commit-message: "Update dependencies" | ||
| ref: ${{ inputs.base-ref }} | ||
| push-branch: temp/bazel-updates | ||
| secrets: | ||
| SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} | ||
|
|
||
| renovate: | ||
| name: Renovate dependencies | ||
| needs: push-update-branch | ||
| if: github.event.repository.fork == false | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout update branch | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: temp/bazel-updates | ||
|
qodo-code-review[bot] marked this conversation as resolved.
|
||
| - name: Reset eval branches | ||
| run: | | ||
| for kind in minor major; do | ||
| branch="renovate/${kind}-eval" | ||
| if git ls-remote --exit-code --heads origin "$branch" >/dev/null; then | ||
| git push origin --delete "$branch" | ||
| fi | ||
| done | ||
| - name: Run Renovate | ||
| uses: renovatebot/github-action@v46.1.14 | ||
| with: | ||
| token: ${{ secrets.SELENIUM_CI_TOKEN || github.token }} | ||
| env: | ||
| LOG_LEVEL: info | ||
| RENOVATE_PLATFORM: github | ||
| RENOVATE_REPOSITORIES: ${{ github.repository }} | ||
| RENOVATE_FORCE: | | ||
| { | ||
| "baseBranchPatterns": ["temp/bazel-updates"], | ||
| "dependencyDashboard": false, | ||
| "dependencyDashboardApproval": false, | ||
| "prCreation": "approval", | ||
|
titusfortner marked this conversation as resolved.
|
||
| "pruneStaleBranches": false, | ||
| "schedule": null | ||
| } | ||
|
|
||
| dependency-pr: | ||
| name: ${{ matrix.kind }} dependency PR | ||
| needs: renovate | ||
| if: always() && github.event.repository.fork == false | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| kind: [minor, major] | ||
| uses: ./.github/workflows/renovate-dependency-pr.yml | ||
| with: | ||
| base-ref: ${{ inputs.base-ref }} | ||
| kind: ${{ matrix.kind }} | ||
| secrets: | ||
| SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| name: Renovate Dependency PR | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| base-ref: | ||
| description: Base branch to target | ||
| required: true | ||
| type: string | ||
| kind: | ||
| description: Dependency update type. Must be minor or major. | ||
| required: true | ||
| type: string | ||
|
titusfortner marked this conversation as resolved.
titusfortner marked this conversation as resolved.
|
||
| secrets: | ||
| SELENIUM_CI_TOKEN: | ||
| required: true | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| detect-branch: | ||
| name: Detect ${{ inputs.kind }} branch | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| exists: ${{ steps.detect.outputs.exists }} | ||
| steps: | ||
| - name: Detect branch | ||
| id: detect | ||
| env: | ||
| KIND: ${{ inputs.kind }} | ||
| REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git | ||
| run: | | ||
| case "$KIND" in | ||
| minor|major) ;; | ||
| *) echo "::error::kind must be minor or major"; exit 1 ;; | ||
| esac | ||
| if git ls-remote --exit-code --heads "$REPO_URL" "renovate/${KIND}-eval" >/dev/null; then | ||
| echo "exists=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "exists=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
titusfortner marked this conversation as resolved.
|
||
|
|
||
| evaluate: | ||
| name: Evaluate ${{ inputs.kind }} dependencies | ||
| needs: detect-branch | ||
| if: needs.detect-branch.outputs.exists == 'true' | ||
| uses: ./.github/workflows/bazel.yml | ||
| with: | ||
| name: Evaluate ${{ inputs.kind }} dependencies | ||
| ref: renovate/${{ inputs.kind }}-eval | ||
| ruby-version: jruby-10.1.0.0 | ||
| run: | | ||
| ./go all:pin | ||
| ./go rust:pin | ||
|
titusfortner marked this conversation as resolved.
|
||
| ./go format | ||
| ./scripts/github-actions/ci-build.sh | ||
| git fetch origin "${{ inputs.base-ref }}" --depth=1 | ||
| git add -A | ||
| git diff --binary --cached "origin/${{ inputs.base-ref }}" > full-changes.patch | ||
| artifact-name: ${{ inputs.kind }}-dependency-changes | ||
| artifact-path: full-changes.patch | ||
|
|
||
| promote: | ||
| name: Promote ${{ inputs.kind }} dependencies | ||
| needs: evaluate | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout base | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ inputs.base-ref }} | ||
| persist-credentials: false | ||
| - name: Download patch | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: ${{ inputs.kind }}-dependency-changes | ||
| - name: Apply patch | ||
| run: | | ||
| git apply --index full-changes.patch | ||
| rm full-changes.patch | ||
|
titusfortner marked this conversation as resolved.
|
||
| - name: Create or update PR | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ secrets.SELENIUM_CI_TOKEN }} | ||
| commit-message: "[build] Update ${{ inputs.kind }} dependencies" | ||
| author: Selenium CI Bot <selenium-ci@users.noreply.github.com> | ||
| branch: renovate/${{ inputs.kind }} | ||
| base: ${{ inputs.base-ref }} | ||
| title: "[build] Update ${{ inputs.kind }} dependencies" | ||
| labels: | | ||
| C-build | ||
| B-dependencies | ||
| body: | | ||
| This PR contains the latest passing ${{ inputs.kind }} dependency updates, squashed into a single commit. | ||
|
|
||
| Included changes: | ||
| - Repository dependency updates from `./go all:update` and `./go rust:update` | ||
| - Renovate ${{ inputs.kind }} dependency updates | ||
| - Generated dependency pins after `./go all:pin` and `./go rust:pin` | ||
| - Formatting fixes from `./go format` | ||
|
|
||
| This PR only advances when pinning, formatting, and RBE validation all pass. If a later evaluation fails, the PR stays on the most recent passing dependency set and the workflow run shows what failed. | ||
|
|
||
| The Renovate [Dependency Dashboard](https://github.com/${{ github.repository }}/issues/13964) is independent of this PR and is used to inspect specific versions and evaluate updates; do not approve dashboard items to drive merges here. | ||
|
|
||
| Workflow runs: ${{ github.server_url }}/${{ github.repository }}/actions/workflows/renovate-dependencies.yml | ||
| This PR run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
titusfortner marked this conversation as resolved.
|
||
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.