Skip to content

Commit f99880d

Browse files
committed
Push images to quay.io
1 parent 8fe3444 commit f99880d

File tree

2 files changed

+70
-10
lines changed

2 files changed

+70
-10
lines changed

.github/workflows/create-docker.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,25 @@ jobs:
1717
matrix:
1818
include:
1919
- dockerfile: ./Dockerfile-dbtool
20-
image: ipbhalle/massbank3-dbtool
20+
image: quay.io/massbank/massbank-dbtool
2121
context: .
2222
- dockerfile: ./Dockerfile-server
23-
image: ipbhalle/massbank3-server
23+
image: quay.io/massbank/massbank-api
2424
context: .
2525
- dockerfile: ./web-frontend/Dockerfile-frontend
26-
image: ipbhalle/massbank3-frontend
26+
image: quay.io/massbank/massbank-frontend
2727
context: ./web-frontend
2828

2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v4
3232

33-
- name: Login to Docker Hub
33+
- name: Login to quay.io
3434
uses: docker/login-action@v3
3535
with:
36-
username: ${{ secrets.DOCKERHUB_USERNAME }}
37-
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
registry: quay.io
37+
username: ${{ secrets.QUAY_USERNAME }}
38+
password: ${{ secrets.QUAY_TOKEN }}
3839

3940
- name: Docker meta
4041
id: meta
@@ -46,15 +47,14 @@ jobs:
4647
type=ref,event=tag
4748
# set latest tag for main branch and tags
4849
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
49-
# set dev tag for dev branch
5050
# set dev tag for dev branch, but exclude ipbhalle/postgres
51-
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' && matrix.image != 'ipbhalle/postgres' }}
51+
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
5252
5353
- name: Build and push
54-
uses: docker/build-push-action@v5
54+
uses: docker/build-push-action@v6
5555
with:
5656
context: ${{ matrix.context }}
5757
push: ${{ github.event_name != 'pull_request' }}
5858
file: ${{ matrix.dockerfile }}
5959
tags: ${{ steps.meta.outputs.tags }}
60-
labels: ${{ steps.meta.outputs.labels }}
60+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/create-docker2.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Create Docker Container
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
- "dev"
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
build-and-push-images:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- dockerfile: ./Dockerfile-dbtool
20+
image: ipbhalle/massbank3-dbtool
21+
context: .
22+
- dockerfile: ./Dockerfile-server
23+
image: ipbhalle/massbank3-server
24+
context: .
25+
- dockerfile: ./web-frontend/Dockerfile-frontend
26+
image: ipbhalle/massbank3-frontend
27+
context: ./web-frontend
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Login to Docker Hub
34+
uses: docker/login-action@v3
35+
with:
36+
username: ${{ secrets.DOCKERHUB_USERNAME }}
37+
password: ${{ secrets.DOCKERHUB_TOKEN }}
38+
39+
- name: Docker meta
40+
id: meta
41+
uses: docker/metadata-action@v5
42+
with:
43+
images: ${{ matrix.image }}
44+
tags: |
45+
# tag event
46+
type=ref,event=tag
47+
# set latest tag for main branch and tags
48+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
49+
# set dev tag for dev branch
50+
# set dev tag for dev branch, but exclude ipbhalle/postgres
51+
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' && matrix.image != 'ipbhalle/postgres' }}
52+
53+
- name: Build and push
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: ${{ matrix.context }}
57+
push: ${{ github.event_name != 'pull_request' }}
58+
file: ${{ matrix.dockerfile }}
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)