-
Notifications
You must be signed in to change notification settings - Fork 21
53 lines (47 loc) · 1.42 KB
/
build-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build and Push Image
on:
push:
branches:
- main
jobs:
build:
name: Build and push image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build Frontend Image
id: build-front
uses: redhat-actions/buildah-build@v2
with:
image: frontend
context: frontend
tags: latest ${{ github.sha }}
containerfiles: |
./frontend/frontend.containerfile
- name: Push frontend image to quay.io
id: push-front-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-front.outputs.image }}
tags: ${{ steps.build-front.outputs.tags }}
registry: quay.io/cloud-bulldozer
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build Backend Image
id: build-back
uses: redhat-actions/buildah-build@v2
with:
image: backend
context: backend
tags: latest ${{ github.sha }}
containerfiles: |
./backend/backend.containerfile
- name: Push backend image to quay.io
id: push-back-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-back.outputs.image }}
tags: ${{ steps.build-back.outputs.tags }}
registry: quay.io/cloud-bulldozer
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}