Skip to content

Commit d923970

Browse files
committed
Update production workflow for openshift
1 parent 1ef9b7b commit d923970

File tree

1 file changed

+41
-17
lines changed

1 file changed

+41
-17
lines changed

.github/workflows/production.yml

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,58 @@ on:
66
- published
77

88
jobs:
9-
build:
9+
release-frontend:
1010
runs-on: ubuntu-latest
11+
1112
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v2
14-
15-
- name: Login to DockerHub
16-
uses: docker/login-action@v1
17-
with:
18-
username: ${{ secrets.DOCKERHUB_USERNAME }}
19-
password: ${{ secrets.DOCKERHUB_TOKEN }}
13+
- uses: actions/checkout@v3
2014

21-
- name: Build and push frontend to production
22-
uses: docker/build-push-action@v2
15+
- name: Build image
16+
id: build-image
17+
uses: redhat-actions/buildah-build@v2
2318
with:
19+
image: grappa-frontend
20+
tags: production ${{ github.sha }}
2421
context: frontend
25-
push: true
26-
tags: toska/front-grappa2:latest
22+
containerfiles: |
23+
frontend/Dockerfile
2724
build-args: |
2825
BASE_PATH=/v2/
2926
GIT_SHA=${{ github.sha }}
3027
31-
- name: Build and push backend to production
32-
uses: docker/build-push-action@v2
28+
- name: Push to quay.io
29+
uses: redhat-actions/push-to-registry@v2
30+
with:
31+
image: ${{ steps.build-image.outputs.image }}
32+
tags: ${{ steps.build-image.outputs.tags }}
33+
registry: quay.io/toska
34+
username: toska+github
35+
password: ${{ secrets.QUAY_IO_TOKEN }}
36+
37+
release-backend:
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v3
42+
43+
- name: Build image
44+
id: build-image
45+
uses: redhat-actions/buildah-build@v2
3346
with:
47+
image: grappa-backend
48+
tags: production ${{ github.sha }}
3449
context: backend
35-
push: true
36-
tags: toska/back-grappa2:latest
50+
containerfiles: |
51+
backend/Dockerfile
3752
build-args: |
3853
BASE_PATH=/v2/
3954
GIT_SHA=${{ github.sha }}
55+
56+
- name: Push to quay.io
57+
uses: redhat-actions/push-to-registry@v2
58+
with:
59+
image: ${{ steps.build-image.outputs.image }}
60+
tags: ${{ steps.build-image.outputs.tags }}
61+
registry: quay.io/toska
62+
username: toska+github
63+
password: ${{ secrets.QUAY_IO_TOKEN }}

0 commit comments

Comments
 (0)