-
Notifications
You must be signed in to change notification settings - Fork 49
59 lines (47 loc) · 1.63 KB
/
Shell-Capstone-Project.yml
File metadata and controls
59 lines (47 loc) · 1.63 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
57
58
59
name: Azure Web App Container Deployment
on:
push:
branches:
- master # Change this to your default branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Set up Docker
uses: azure/docker-login@v1
with:
login-server: https://hub.docker.com/
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Build and push Docker image
# run: |
# docker build -t senthilnata1/shell-java-app:0.0.1.Release .
# docker push senthilnata1/shell-java-app:0.0.1.Release
- name: Build Docker Image
run: docker build -t senthilnata1/shell-java-app:0.0.1.Release .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker Image
run: docker push senthilnata1/shell-java-app:0.0.1.Release
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: azure-web-app-shell-java-app
images: senthilnata1/shell-java-app:0.0.1.Release