This repository was archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.41 KB
/
on_push.yml
File metadata and controls
56 lines (51 loc) · 1.41 KB
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
54
55
56
name: Build and push branches
on:
workflow_dispatch:
push:
branches-ignore:
- master
jobs:
build_frontend:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DockerUsername }}
password: ${{ secrets.DockerPassword }}
- name: Checkout
uses: actions/checkout@v2
- name: Get smart tag
id: prepare
uses: Surgo/docker-smart-tag-action@v1
with:
docker_image: collaction/frontend
- name: Build and push frontend to docker
uses: docker/build-push-action@v2
with:
context: Frontend
push: true
tags: ${{ steps.prepare.outputs.tag }}
build_backend:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DockerUsername }}
password: ${{ secrets.DockerPassword }}
- name: Checkout
uses: actions/checkout@v2
- name: Get smart tag
id: prepare
uses: Surgo/docker-smart-tag-action@v1
with:
docker_image: collaction/backend
- uses: docker/build-push-action@v2
with:
username: ${{ secrets.DockerUsername }}
password: ${{ secrets.DockerPassword }}
file: CollAction/Dockerfile
context: .
tags: ${{ steps.prepare.outputs.tag }}
dockerfile: CollAction/Dockerfile