-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.57 KB
/
public_equinor.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
name: Build deploy
on:
push:
branches:
- main
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set image tag and short sha
run: |
echo "DOCKER_IMG_VERSION=$(cat ./version.txt)" >> $GITHUB_ENV
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Azure login OIDC
uses: Azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Fetch secrets from key vault
uses: Azure/get-keyvault-secrets@v1
with:
keyvault: "flowifyDev"
secrets: 'AURORA-ACR'
id: fetchSecrets
- name: Azure Container Registry login
uses: docker/login-action@v1
with:
registry: auroradevacr.azurecr.io
username: ${{ secrets.AZURE_CLIENT_ID }}
password: ${{steps.fetchSecrets.outputs.AURORA-ACR}}
- name: Initialize BuildX
uses: docker/setup-buildx-action@v1
- name: Build and push image
uses: docker/build-push-action@v2
with:
file: ./Dockerfile
context: .
push: true
tags: |
auroradevacr.azurecr.io/flowify/flowify-componenet-array:${{ env.DOCKER_IMG_VERSION }}
auroradevacr.azurecr.io/flowify/flowify-componenet-array:${{ env.SHORT_SHA}}