Skip to content

Commit 8d3fe80

Browse files
committed
[ci] Mirror FFmpeg based image to GHCR
[skip ci] Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent e81a2ed commit 8d3fe80

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/build-ffmpeg.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
env:
6262
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
6363
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
64+
- name: Login GitHub Container Registry
65+
if: ${{ github.event.inputs.release == 'true' }}
66+
run: echo "${{ secrets.SELENIUM_CI_TOKEN }}" | docker login ghcr.io -u "${{ secrets.SELENIUM_CI_USERNAME }}" --password-stdin
6467
- name: Deploy new images
6568
if: ${{ github.event.inputs.release == 'true' }}
6669
uses: nick-invision/retry@master
@@ -70,3 +73,12 @@ jobs:
7073
retry_wait_seconds: 300
7174
command: |
7275
make release_ffmpeg_latest
76+
- name: Mirror images to GHCR
77+
if: ${{ github.event.inputs.release == 'true' }}
78+
uses: nick-invision/retry@master
79+
with:
80+
timeout_minutes: 20
81+
max_attempts: 5
82+
retry_wait_seconds: 300
83+
command: |
84+
GHCR_NAMESPACE="ghcr.io/$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" make release_ffmpeg_ghcr_latest

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,13 @@ release_ffmpeg_latest:
533533
docker push $(NAME)/ffmpeg:$(FFMPEG_VERSION)
534534
docker push $(NAME)/ffmpeg:$(FFMPEG_VERSION)-$(BUILD_DATE)
535535

536+
release_ffmpeg_ghcr_latest:
537+
for tag in latest $(FFMPEG_VERSION) $(FFMPEG_VERSION)-$(BUILD_DATE); do \
538+
docker buildx imagetools create \
539+
--tag $(GHCR_NAMESPACE)/ffmpeg:$$tag \
540+
docker.io/$(NAME)/ffmpeg:$$tag ; \
541+
done
542+
536543
release_latest:
537544
docker push $(NAME)/base:latest
538545
docker push $(NAME)/hub:latest

0 commit comments

Comments
 (0)