Pin Browsers #741
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: Pin Browsers | |
| on: | |
| schedule: | |
| - cron: 10 0 * * * | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| update: | |
| name: Update Pinned Browsers | |
| uses: ./.github/workflows/bazel.yml | |
| with: | |
| name: Pin Browsers | |
| run: bazel run //scripts:pinned_browsers | |
| artifact-name: pinned-browsers | |
| push-changes: | |
| name: Push Changes | |
| needs: update | |
| if: github.event.repository.fork == false | |
| permissions: | |
| contents: write | |
| actions: read | |
| uses: ./.github/workflows/commit-changes.yml | |
| with: | |
| artifact-name: pinned-browsers | |
| commit-message: "Update pinned browser versions" | |
| push-branch: pinned-browser-updates | |
| secrets: | |
| SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} | |
| create-pr: | |
| name: Create Pull Request | |
| needs: push-changes | |
| if: github.event.repository.fork == false && needs.push-changes.outputs.changes-committed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create Pull Request | |
| env: | |
| GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} | |
| run: | | |
| existing=$(gh pr list --head pinned-browser-updates --json number --jq '.[0].number // empty') | |
| if [ -n "$existing" ]; then | |
| echo "::notice::PR #$existing already exists" | |
| else | |
| gh pr create \ | |
| --head pinned-browser-updates \ | |
| --base trunk \ | |
| --title "[dotnet][rb][java][js][py] Automated Browser Version Update" \ | |
| --body $'This is an automated pull request to update pinned browsers and drivers\n\nMerge after verify the new browser versions properly passing the tests and no bugs need to be filed' | |
| fi |