-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 2.06 KB
/
azure-container-registry.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
60
61
62
63
64
65
66
# This workflow will build and push a Docker container to an Azure Container registry when a commit is pushed to your default branch.
name: Build and deploy a container to ACR
env:
AZURE_WEBAPP_NAME: MilesKonferanser
on:
push:
branches:
- "dev"
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Make envfile
uses: SpicyPizza/create-envfile@v1.3
with:
ORIGIN: https://konferanser.azurewebsites.net
CONF_API_KEY: ${{secrets.CONF_API_KEY}}
CVPARTNER_API_KEY: ${{secrets.CVPARTNER_API_KEY}}
CREDENTIAL_SALT: ${{secrets.CREDENTIAL_SALT}}
SANITY_TOKEN: ${{secrets.SANITY_TOKEN}}
GOOGLE_CLIENT_ID: ${{secrets.GOOGLE_CLIENT_ID}}
GOOGLE_CLIENT_SECRET: ${{secrets.GOOGLE_CLIENT_SECRET}}
PUBLIC_SANITY_DATASET: test
PUBLIC_SANITY_PROJECTID: mhv8s2ia
CVPARTNER_BASE: https://miles.cvpartner.com
- name: Log in to GitHub container registry
uses: docker/login-action@v1.10.0
with:
registry: ${{secrets.ACR_LOGIN_SERVER}}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build and push container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.ACR_TAG }}
file: ./Dockerfile
env:
ORIGIN: https://konferanser.azurewebsites.net
CONF_API_KEY: ${{secrets.CONF_API_KEY}}
CVPARTNER_API_KEY: ${{secrets.CVPARTNER_API_KEY}}
CREDENTIAL_SALT: ${{secrets.CREDENTIAL_SALT}}
SANITY_TOKEN: ${{secrets.SANITY_TOKEN}}
GOOGLE_CLIENT_ID: ${{secrets.GOOGLE_CLIENT_ID}}
GOOGLE_CLIENT_SECRET: ${{secrets.GOOGLE_CLIENT_SECRET}}
PUBLIC_SANITY_DATASET: test
PUBLIC_SANITY_PROJECTID: mhv8s2ia
CVPARTNER_BASE: https://miles.cvpartner.com