Skip to content

Commit bc81e8f

Browse files
BarbellDwarfrishikanthc
authored andcommitted
Update GitHub Actions workflow for Docker image builds
- Change workflow name to 'build-images-main' for better clarity - Limit workflow to trigger only on pushes to the 'main' branch - Add steps to build and push a new GPU-enabled Docker image (scriberr:main-gpu) alongside the existing main image - Create workflow "build-images-nightly.yml" to allow for images that are still in testing to be built when pushed to the Nightly branch. It is limited to the Nightly branch. - Nightly branch will build a GPU and CPU only version. - Ensure each image is verified for multi-platform support after the build process
1 parent 7d963a4 commit bc81e8f

File tree

2 files changed

+72
-11
lines changed

2 files changed

+72
-11
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: build-images-main
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Only trigger on pushes to the main branch
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Delete huge unnecessary tools folder
13+
run: rm -rf /opt/hostedtoolcache
14+
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v3
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Login to GHCR
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.repository_owner }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build and push scriberr:main Docker image
29+
uses: docker/build-push-action@v6
30+
with:
31+
platforms: linux/amd64,linux/arm64
32+
push: true
33+
file: ./Dockerfile
34+
tags: |
35+
ghcr.io/rishikanthc/scriberr:main
36+
37+
- name: Build and push scriberr:main-gpu Docker image
38+
uses: docker/build-push-action@v6
39+
with:
40+
platforms: linux/amd64,linux/arm64
41+
push: true
42+
file: ./Dockerfile-gpu
43+
tags: |
44+
ghcr.io/rishikanthc/scriberr:main-gpu
45+
46+
- name: Verify multi-platform image for scriberr:main
47+
run: |
48+
docker buildx imagetools inspect ghcr.io/rishikanthc/scriberr:latest
49+
50+
- name: Verify multi-platform image for scriberr:main-gpu
51+
run: |
52+
docker buildx imagetools inspect ghcr.io/rishikanthc/scriberr:latest-gpu
Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,52 @@
1-
name: ci
1+
name: build-images-nightly
22

33
on:
44
push:
5+
branches:
6+
- nightly # Only trigger on pushes to the nightly branch
57

68
jobs:
79
docker:
810
runs-on: ubuntu-latest
911
steps:
1012
- name: Delete huge unnecessary tools folder
1113
run: rm -rf /opt/hostedtoolcache
12-
14+
1315
- name: Set up QEMU
1416
uses: docker/setup-qemu-action@v3
15-
17+
1618
- name: Set up Docker Buildx
1719
uses: docker/setup-buildx-action@v3
18-
20+
1921
- name: Login to GHCR
2022
uses: docker/login-action@v3
2123
with:
2224
registry: ghcr.io
2325
username: ${{ github.repository_owner }}
2426
password: ${{ secrets.GITHUB_TOKEN }}
2527

26-
- name: Build and push Docker image
28+
- name: Build and push scriberr:nightly Docker image
2729
uses: docker/build-push-action@v6
28-
with:
30+
with:
2931
platforms: linux/amd64,linux/arm64
3032
push: true
3133
file: ./Dockerfile
3234
tags: |
3335
ghcr.io/rishikanthc/scriberr:nightly
3436
35-
- name: Verify multi-platform image
37+
- name: Build and push scriberr:nightly-gpu Docker image
38+
uses: docker/build-push-action@v6
39+
with:
40+
platforms: linux/amd64,linux/arm64
41+
push: true
42+
file: ./Dockerfile-gpu
43+
tags: |
44+
ghcr.io/rishikanthc/scriberr:nightly-gpu
45+
46+
- name: Verify multi-platform image for scriberr:nightly
3647
run: |
3748
docker buildx imagetools inspect ghcr.io/rishikanthc/scriberr:nightly
3849
39-
- name: Push image to GHCR
50+
- name: Verify multi-platform image for scriberr:nightly-gpu
4051
run: |
41-
docker buildx imagetools create \
42-
ghcr.io/rishikanthc/scriberr:nightly \
43-
--tag ghcr.io/rishikanthc/scriberr:nightly
52+
docker buildx imagetools inspect ghcr.io/rishikanthc/scriberr:nightly-gpu

0 commit comments

Comments
 (0)