Skip to content

Commit defc332

Browse files
committed
Use Windows docker image stored as private image in docker hub
1 parent a6d9245 commit defc332

4 files changed

Lines changed: 32 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,41 @@ jobs:
300300
- name: Get Release Notes
301301
uses: ./.github/actions/get-release-notes
302302

303+
# firebirdsql/firebird-builder-windows image is private
304+
- name: Login to Docker Hub
305+
id: dockerhub-login
306+
uses: docker/login-action@v3
307+
continue-on-error: true
308+
with:
309+
username: firebirdsql
310+
password: ${{ secrets.DOCKERHUB_TOKEN }}
311+
312+
- name: Docker pull firebirdsql/firebird-builder-windows
313+
shell: cmd
314+
if: ${{ steps.dockerhub-login.outcome == 'success' }}
315+
run: |
316+
docker pull firebirdsql/firebird-builder-windows:fb6-x86-x64-windows-v1
317+
318+
- name: Reclaim disk space in the runner to build the image
319+
if: ${{ runner.environment == 'github-hosted' && steps.dockerhub-login.outcome != 'success' }}
320+
shell: cmd
321+
run: |
322+
rd "C:\Program Files\Microsoft Visual Studio\2022" /s /q
323+
324+
- name: Build firebird-builder-windows image (fallback)
325+
shell: cmd
326+
if: ${{ steps.dockerhub-login.outcome != 'success' }}
327+
run: |
328+
cd builds\docker\windows
329+
call build.bat
330+
303331
- name: Build x86 for client package in x64
304332
id: build-x86
305333
shell: cmd
306334
if: ${{ matrix.platform == 'x64' }}
307335
run: |
308336
mkdir builds\install_images
309337
cd builds\docker\windows
310-
call build.bat
311338
call run.bat C:\fbscripts\build-x86.bat
312339
313340
- name: Build
@@ -318,7 +345,6 @@ jobs:
318345
run: |
319346
mkdir builds\install_images
320347
cd builds\docker\windows
321-
call build.bat
322348
call run.bat C:\fbscripts\build-%PLATFORM%.bat
323349
324350
- name: Upload zip

builds/docker/windows/build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
docker build -t asfernandes/firebird-builder:5 -m 2GB .
2+
docker build -t firebirdsql/firebird-builder-windows:fb6-x86-x64-windows-v1 -m 2GB .

builds/docker/windows/push.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
docker push firebirdsql/firebird-builder-windows:fb6-x86-x64-windows-v1

builds/docker/windows/run.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
docker run --rm -v %cd%\..\..\..:C:\firebird asfernandes/firebird-builder:5 %1
2+
docker run --rm -v %cd%\..\..\..:C:\firebird firebirdsql/firebird-builder-windows:fb6-x86-x64-windows-v1 %1

0 commit comments

Comments
 (0)