-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.95 KB
/
build-deploy-k8s-sandbox-azure.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build, Migrate & Deploy to Sandbox on Azure
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]
- name: 'Login into ACR'
uses: azure/[email protected]
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: 'Build & Push image'
run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-file-service:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-file-service:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-file-service:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]
- name: 'Login via Azure CLI'
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
- uses: Azure/[email protected]
with:
cluster-name: k8s-sandbox
resource-group: res-grp-k8s-sandbox
- uses: Azure/[email protected]
with:
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: alkemio-file-service-secret
- uses: azure/[email protected]
with:
version: 'v1.22.0' # default is latest stable, fixing it to a compatible version
id: install
- uses: Azure/[email protected]
with:
manifests: |
manifests/25-file-service-deployment-dev.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-file-service:${{ github.sha }}
imagepullsecrets: |
alkemio-file-service-secret