Skip to content

Commit 8196fee

Browse files
committed
[ci] Mirror Beta/Dev images to GHCR
[skip ci] Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent 7edee1f commit 8196fee

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

.github/workflows/update-dev-beta-browser-images.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ jobs:
117117
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
118118
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
119119

120+
- name: Login GitHub Container Registry
121+
run: echo "${{ secrets.SELENIUM_CI_TOKEN }}" | docker login ghcr.io -u "${{ secrets.SELENIUM_CI_USERNAME }}" --password-stdin
122+
120123
- name: Deploy Dev/Beta Docker container images
121124
run: |
122125
docker push $NAME/node-$BROWSER:$CHANNEL
@@ -137,6 +140,9 @@ jobs:
137140
echo "$BROWSER_CAPS $CHANNEL_CAPS WebDriver version:"
138141
docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$DRIVER_VERSION_COMMAND"
139142
143+
- name: Mirror images to GHCR
144+
run: GHCR_NAMESPACE="ghcr.io/$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" BROWSER_NAME="${BROWSER}" BROWSER_TAG="${CHANNEL}" make mirror_browser_channel_image_ghcr
145+
140146

141147
rerun-workflow-when-failure:
142148
name: Rerun workflow when failure

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,13 @@ mirror_browser_images_ghcr:
491491
done ; \
492492
done
493493

494+
mirror_browser_channel_image_ghcr:
495+
for image in node-$(BROWSER_NAME) standalone-$(BROWSER_NAME); do \
496+
docker buildx imagetools create \
497+
--tag $(GHCR_NAMESPACE)/$$image:$(BROWSER_TAG) \
498+
docker.io/$(NAME)/$$image:$(BROWSER_TAG) ; \
499+
done
500+
494501
tag_ffmpeg_latest:
495502
docker tag $(NAME)/ffmpeg:$(FFMPEG_VERSION)-$(BUILD_DATE) $(NAME)/ffmpeg:latest
496503
docker tag $(NAME)/ffmpeg:$(FFMPEG_VERSION)-$(BUILD_DATE) $(NAME)/ffmpeg:$(FFMPEG_VERSION)

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Nightly](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yml)
55
[![Update Dev/Beta Browser Images](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/update-dev-beta-browser-images.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/update-dev-beta-browser-images.yml)
66
[![Releases downloads](https://img.shields.io/github/downloads/seleniumhq/docker-selenium/total.svg)](https://github.com/SeleniumHQ/docker-selenium/releases)
7-
[<img src="https://devin.ai/assets/deepwiki-badge.png" alt="Ask DeepWiki.com" height="20"/>](https://deepwiki.com/SeleniumHQ/docker-selenium)
7+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/SeleniumHQ/docker-selenium)
88

99
![GitHub Last Commit](https://img.shields.io/github/last-commit/seleniumhq/docker-selenium)
1010
[![GitHub Release](https://img.shields.io/github/v/release/seleniumhq/docker-selenium?link=https%3A%2F%2Fgithub.com%2Fseleniumhq%2Fdocker-selenium%2Freleases%2Flatest&label=latest%20Image)](https://github.com/seleniumhq/docker-selenium/releases/)
@@ -56,6 +56,7 @@ Talk to us at https://www.selenium.dev/support/
5656
* [Video recording](#video-recording)
5757
* [Video recording with dynamic file name based on metadata in tests](#video-recording-with-dynamic-file-name-based-on-metadata-in-tests)
5858
* [Video recording and uploading](#video-recording-and-uploading)
59+
* [Retain recordings for failed sessions only](#retain-recordings-for-failed-sessions-only)
5960
* [Dynamic Grid](#dynamic-grid)
6061
* [Configuration example](#configuration-example)
6162
* [Share volumes config of Dynamic Grid container to node browser containers](#share-volumes-config-of-dynamic-grid-container-to-node-browser-containers)
@@ -846,7 +847,7 @@ When using in Dynamic Grid, those variables should be combined with the prefix `
846847
| `SE_UPLOAD_CONFIG_FILE_NAME` | `upload.conf` | Config file for remote host instead of set via env variable prefix SE_RCLONE_* |
847848
| `SE_UPLOAD_CONFIG_DIRECTORY` | `/opt/bin` | Directory of config file (change it when conf file in another directory is mounted) |
848849
849-
### Retain recordings for failed sessions only
850+
## Retain recordings for failed sessions only
850851
851852
In event-driven mode (`SE_VIDEO_EVENT_DRIVEN=true`, the default), the video service subscribes to the Grid's ZeroMQ event bus and reacts to session lifecycle events in real time. This enables a **retain-on-failure** strategy: record every session, but automatically discard the video when the session passes and only keep (and upload) recordings from sessions that fail.
852853

generate_release_notes.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ echo '```' >>release_notes.md
6565
echo "" >>release_notes.md
6666
echo "</details>" >>release_notes.md
6767

68+
echo "" >>release_notes.md
69+
70+
echo "### Published Docker images on [GitHub Container Registry](https://github.com/orgs/SeleniumHQ/packages?repo_name=docker-selenium)" >>release_notes.md
71+
echo "<details>" >>release_notes.md
72+
echo "<summary>Click to see published Docker images</summary>" >>release_notes.md
73+
echo "" >>release_notes.md
74+
echo '```' >>release_notes.md
75+
docker images --filter=reference=ghcr.io/seleniumhq'/*:'${FILTER_IMAGE_TAG:-"*"} --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}" >>release_notes.md
76+
echo '```' >>release_notes.md
77+
echo "" >>release_notes.md
78+
echo "</details>" >>release_notes.md
79+
6880
echo "" >>release_notes.md
6981
chart_version=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^version | cut -d ':' -f 2 | tr -d '[:space:]')
7082
echo "### Published Helm chart version [selenium-grid-${chart_version}](https://github.com/${AUTHORS}/docker-selenium/releases/tag/selenium-grid-${chart_version})" >>release_notes.md

0 commit comments

Comments
 (0)