-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.25 KB
/
build-and-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
name: Build and Push Docker Images
on:
push:
branches:
- main
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
jobs:
build-and-push:
name: Build and Push Docker Images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Create env file'
run: |
echo "${{ secrets.DOCKER_ENV_FILE }}" > .env
- name: Build
run: |
docker compose build
- name: Push Auth Image
env:
DOCKER_BUILDKIT: 1
run: |
docker tag mauagendar-auth luisgmunhoz/mauagendar-auth
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push luisgmunhoz/mauagendar-auth
- name: Push Calendar Image
env:
DOCKER_BUILDKIT: 1
run: |
docker tag mauagendar-calendar luisgmunhoz/mauagendar-calendar
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push luisgmunhoz/mauagendar-calendar