Skip to content

Commit 8df7342

Browse files
authored
Build image of github package (#39)
1 parent 8e1349c commit 8df7342

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

.github/workflows/docker-build.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ jobs:
2222
- name: Login to DockerHub
2323
uses: docker/login-action@v3
2424
with:
25-
username: wh1isper
25+
username: ${{ vars.DOCKERHUB_USERNAME }}
2626
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
- name: Login to GitHub Container Registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: b-scheduler
32+
password: ${{ secrets.PAT }}
2733
- name: Build and push release
2834
id: docker_build_release_matrix
2935
uses: docker/build-push-action@v5
@@ -34,4 +40,6 @@ jobs:
3440
cache-to: type=gha,mode=max
3541
file: ./docker/Dockerfile
3642
push: true
37-
tags: wh1isper/brq:dev
43+
tags: |
44+
${{ vars.DOCKERHUB_USERNAME }}/brq:dev
45+
ghcr.io/b-scheduler/brq:dev

.github/workflows/docker-publish.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ jobs:
3333
- name: Login to DockerHub
3434
uses: docker/login-action@v3
3535
with:
36-
username: wh1isper
36+
username: ${{ vars.DOCKERHUB_USERNAME }}
3737
password: ${{ secrets.DOCKERHUB_TOKEN }}
38+
- name: Login to GitHub Container Registry
39+
uses: docker/login-action@v3
40+
with:
41+
registry: ghcr.io
42+
username: b-scheduler
43+
password: ${{ secrets.PAT }}
3844
- name: Build and push image
3945
id: docker_build_publish
4046
uses: docker/build-push-action@v5
@@ -45,7 +51,9 @@ jobs:
4551
cache-to: type=gha,mode=max
4652
file: ./docker/Dockerfile
4753
push: true
48-
tags: wh1isper/brq:${{ github.ref_name }}
54+
tags: |
55+
${{ vars.DOCKERHUB_USERNAME }}/brq:${{ github.ref_name }}
56+
ghcr.io/b-scheduler/brq:${{ github.ref_name }}
4957
- name: Build and push image
5058
id: docker_build_publish_matrix_latest
5159
uses: docker/build-push-action@v5
@@ -56,4 +64,6 @@ jobs:
5664
cache-to: type=gha,mode=max
5765
file: ./docker/Dockerfile
5866
push: true
59-
tags: wh1isper/brq:latest
67+
tags: |
68+
${{ vars.DOCKERHUB_USERNAME }}/brq:latest
69+
ghcr.io/b-scheduler/brq:latest

docker/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ FROM python:3.11.10-slim-bookworm
1010
COPY --from=builder /source/dist/*.whl /tmp/
1111

1212
RUN pip install --no-cache-dir $(echo /tmp/*.whl)[browser]
13+
14+
LABEL org.opencontainers.image.source=https://github.com/b-scheduler/bscheduler

0 commit comments

Comments
 (0)