forked from Tatoeba/tatoeba2
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1008 Bytes
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
name: Build and Deploy to Azure App Service
on:
push:
branches:
- docker
env:
AZURE_WEBAPP_NAME: trang-test
AZURE_RG: test
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
REGISTRY_URL: trangtestregistry.azurecr.io
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to Azure Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Build and push Docker image
run: |
docker-compose build
docker-compose push
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: ${{ env.REGISTRY_URL }}/tatoeba:latest