-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (28 loc) · 1.28 KB
/
docker.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
name: Build and push Docker images
on:
push:
branches:
- main
paths:
- src/**
- .github/workflows/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Pull source code
uses: actions/checkout@v1
- name: Build API image
run: docker build src/api/ --file src/api/Dockerfile --tag robinmanuelthiel/microcommunication-api:$(date +%s) --tag robinmanuelthiel/microcommunication-api:latest
- name: Build Random image
run: docker build src/random/ --file src/random/Dockerfile --tag robinmanuelthiel/microcommunication-random:$(date +%s) --tag robinmanuelthiel/microcommunication-random:latest
- name: Build Web image
run: docker build src/web/ --file src/web/Dockerfile --tag robinmanuelthiel/microcommunication-web:$(date +%s) --tag robinmanuelthiel/microcommunication-web:latest
- name: Login to Docker Hub
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Push API image
run: docker push robinmanuelthiel/microcommunication-api
- name: Push Random image
run: docker push robinmanuelthiel/microcommunication-random
- name: Push Web image
run: docker push robinmanuelthiel/microcommunication-web