-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 1.02 KB
/
deploy.yml
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
on:
push:
branches:
- 'main'
name: Build and Push to ACR
jobs:
build-and-push:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: 'Build and push image'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }}
docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest
docker inspect ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest