-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 948 Bytes
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI/CD
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Login to azure'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }}
- name: 'Login to private container registry'
uses: Azure/docker-login@v1
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
login-server: ${{ secrets.REGISTRY_URL }}
- name: 'Setup docker build'
uses: docker/setup-buildx-action@v3
- name: 'Build docker image'
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
tags: latest
build-args: |
GIT_COMMIT=${{GITHUB_SHA}}
GIT_BRANCH=${{GITHUB_REF}}
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')