Skip to content

Commit 16cf0b4

Browse files
authored
Merge pull request #291 from THM-Health/ci-update-chrome
Add CI workflow to update chrome version
2 parents 7e4b1af + ee790e8 commit 16cf0b4

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update Chrome version to latest stable
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *" # Run every day at midnight
7+
8+
jobs:
9+
check-for-updates:
10+
name: Check for Chrome stable
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Get the latest Chrome stable
15+
run: |
16+
curl -s --request GET \
17+
--url "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json" \
18+
> chrome-release.json
19+
- name: Extract the latest Chrome stable version
20+
run: echo "LATEST_CHROME_VERSION=$(jq -r '.channels.Stable.version' chrome-release.json)" >> $GITHUB_ENV
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 2
25+
- name: Extract the current chrome version from Dockerfile
26+
run: echo "CURRENT_CHROME_VERSION=$(sed -n 's/ARG CHROME_VERSION=//p' src/worker/Dockerfile)" >> $GITHUB_ENV
27+
- name: Compare the versions
28+
run: echo "NEEDS_UPDATE=$(dpkg --compare-versions ${{ env.LATEST_CHROME_VERSION }} gt ${{ env.CURRENT_CHROME_VERSION }} && echo true || echo false)" >> $GITHUB_ENV
29+
- name: Update the Chrome version
30+
if: ${{ env.NEEDS_UPDATE == 'true' }}
31+
run: |
32+
sed -i "s/ARG CHROME_VERSION=.*/ARG CHROME_VERSION=${LATEST_CHROME_VERSION}/" src/worker/Dockerfile
33+
- name: Create PR with the update
34+
if: ${{ env.NEEDS_UPDATE == 'true' }}
35+
uses: peter-evans/create-pull-request@v7
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
add-paths: "docker/app/Dockerfile"
39+
commit-message: "Update Chrome to version ${{ env.LATEST_CHROME_VERSION }}"
40+
title: "Bump Chrome from ${{ env.CURRENT_CHROME_VERSION }} to ${{ env.LATEST_CHROME_VERSION }}"
41+
labels: "dependencies"
42+
body: |
43+
Bumps Chrome from ${{ env.CURRENT_CHROME_VERSION }} to ${{ env.LATEST_CHROME_VERSION }}
44+
45+
## Automated Update
46+
This PR was automatically generated by the Chrome update workflow.
47+
branch: "update-chrome-${{ env.LATEST_CHROME_VERSION }}"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Worker: Option to set Chrome version on build time ([#290])
13+
- CI: Workflow to update chrome version ([#291])
1314

1415
## [v1.1.1] - 2025-06-16
1516

@@ -38,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3839
[#107]: https://github.com/THM-Health/BBB-Streaming-Server/pull/107
3940
[#113]: https://github.com/THM-Health/BBB-Streaming-Server/pull/113
4041
[#290]: https://github.com/THM-Health/BBB-Streaming-Server/pull/290
42+
[#291]: https://github.com/THM-Health/BBB-Streaming-Server/pull/291
4143

4244

4345
[unreleased]: https://github.com/THM-Health/BBB-Streaming-Server/compare/v1.1.1...main

0 commit comments

Comments
 (0)