-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 972 Bytes
/
Copy pathci.yml
File metadata and controls
39 lines (30 loc) · 972 Bytes
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
name: Build & Push Docker Image to ACR
on:
push:
branches:
- Project # or whatever your deployment branch is
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Java 17 & Maven
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Build JAR with Maven
run: |
cd aci-demo
mvn clean package -DskipTests
- name: Log in to Azure Container Registry
run: |
echo "${{ secrets.ACR_PASSWORD }}" | docker login aaravregistry.azurecr.io -u ${{ secrets.ACR_USERNAME }} --password-stdin
- name: Build Docker image
run: |
cd aci-demo
docker build -t aaravregistry.azurecr.io/acidemo:latest .
- name: Push Docker image to ACR
run: docker push aaravregistry.azurecr.io/acidemo:latest