-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.28 KB
/
main.yml
File metadata and controls
38 lines (33 loc) · 1.28 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
name: CI
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@master
- name: 'Login via Azure CLI'
uses: Azure/docker-login@v1
with:
login-server: mitsha.azurecr.io
username: ${{ SECRETS.REGISTRY_USERNAME }}
password: ${{ SECRETS.REGISTRY_PASSWORD }}
- run: |
docker build . -t mitsha.azurecr.io/aci-up-python-example:${{ github.sha }}
docker push mitsha.azurecr.io/aci-up-python-example:${{ github.sha }}
- name: 'Azure Login'
uses: azure/login@v1
with:
creds: ${{ SECRETS.AZURE_CREDENTIALS }}
- name: 'Deploy to Azure Container Instances'
uses: azure/aci-deploy@v1
with:
resource-group: mitsha-test
name: aci-up-python-example
image: mitsha.azurecr.io/aci-up-python-example:${{ github.sha }}
ports: 80 8080
dns-name-label: aci-up-python-example
registry-login-server: mitsha.azurecr.io
registry-username: ${{ SECRETS.REGISTRY_USERNAME }}
registry-password: ${{ SECRETS.REGISTRY_PASSWORD }}
location: centralus