-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 1.21 KB
/
docker-image.yml
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
name: Docker Image CI
on:
pull_request:
branches:
- main
types:
- closed
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Frontend Image
run: docker build -t deretz/endurace_reporting:frontend.${{ github.sha }} -f front/Dockerfile front/
- name: Build Backend Image
run: docker build -t deretz/endurace_reporting:backend.${{ github.sha }} -f back/Dockerfile back/
- name: Push Frontend Image
run: |
docker tag deretz/endurace_reporting:frontend.${{ github.sha }} deretz/endurace_reporting:frontend.latest
docker push deretz/endurace_reporting:frontend.${{ github.sha }}
docker push deretz/endurace_reporting:frontend.latest
- name: Push Backend Image
run: |
docker tag deretz/endurace_reporting:backend.${{ github.sha }} deretz/endurace_reporting:backend.latest
docker push deretz/endurace_reporting:backend.${{ github.sha }}
docker push deretz/endurace_reporting:backend.latest