-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (45 loc) · 1.58 KB
/
digitalocean.yml
File metadata and controls
53 lines (45 loc) · 1.58 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
on:
push:
branches:
- main
pull_request:
branches:
- main
# Environment variables available to all jobs and steps in this workflow
env:
ANGULAR_IMAGE_NAME: social-login-app-client
ANGULAR_CONTAINER_NAME: social-login-app-client
ANGULAR_DEPLOYMENT_NAME: social-login-app-client
SPRING_BOOT_IMAGE_NAME: social-login-app-server
SPRING_BOOT_CONTAINER_NAME: social-login-app-server
SPRING_BOOT_DEPLOYMENT_NAME: social-login-app-server
jobs:
build:
name: Build, push, and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@main
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Provide permission to run mvnw
run: chmod +x ./spring-boot-oauth2-social-login/mvnw
- name: Build and push Angular Image
id: angular_docker_build
uses: docker/build-push-action@v2
with:
context: ./angular-11-social-login
file: ./angular-11-social-login/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.ANGULAR_IMAGE_NAME }}:${{ github.sha }}
- name: Build and push Spring Boot Image
id: spring-boot-docker_build
uses: docker/build-push-action@v2
with:
context: ./spring-boot-oauth2-social-login
file: ./spring-boot-oauth2-social-login/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.SPRING_BOOT_IMAGE_NAME }}:${{ github.sha }}