-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
72 lines (70 loc) · 2.51 KB
/
release-preparation.yml
File metadata and controls
72 lines (70 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release Preparation
on:
workflow_call:
inputs:
grid-version:
required: true
default: '4.41.0'
type: string
workflow_dispatch:
inputs:
grid-version:
required: true
type: string
default: '4.41.0'
description: Expected Grid version to update
jobs:
pr-results:
name: Create a PR with changelog
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
- name: Check existing PR
id: check-pr
run: |
PR_NUMBER=$(gh pr list --base trunk --head release-preparation --json number --jq '.[0].number')
if [ "$PR_NUMBER" != "null" ] && [ -n "$PR_NUMBER" ]; then
echo "pr-exists=true" >> $GITHUB_OUTPUT
else
echo "pr-exists=false" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout PR branch
if: steps.check-pr.outputs.pr-exists == 'true'
run: |
git checkout release-preparation
- name: Run scripts
run: |
EXPECTED_BASE_VERSION=${EXPECTED_BASE_VERSION} make update_release_version
make update_selenium_version_matrix
make update_browser_versions_matrix
env:
EXPECTED_BASE_VERSION: ${{ inputs.grid-version }}
- name: Commit & Push changes
if: steps.check-pr.outputs.pr-exists == 'true'
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
author_email: "[email protected]"
author_name: "Selenium CI Bot"
message: "[build] Update Selenium Grid ${{ inputs.grid-version }}"
empty: true
rebase: true
branch: "release-preparation"
- name: Create Pull Request
if: steps.check-pr.outputs.pr-exists == 'false'
uses: peter-evans/create-pull-request@main
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
commit-message: |
[build] Update Selenium Grid ${{ inputs.grid-version }}
title: "[build] Update Selenium Grid ${{ inputs.grid-version }}"
body: "This PR to update Selenium Grid ${{ inputs.grid-version }} and backward browser versions"
committer: 'Selenium CI Bot <[email protected]>'
author: 'Selenium CI Bot <[email protected]>'
branch: release-preparation