-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-api.yml
42 lines (36 loc) · 1.29 KB
/
content-api.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
name: content-api
# This workflow is triggered on push to the 'content-web' directory of the master branch of the repository
on:
push:
branches:
- master
paths:
- 'content-api/**'
# Configure workflow to also support triggering manually
workflow_dispatch:
# Environment variables are defined so that they can be used throughout the job definitions.
env:
imageRepository: 'content-api'
resourceGroupName: 'fabmedical-[DeploymentID]'
containerRegistryName: 'acr[DeploymentID]'
containerRegistry: 'acr[DeploymentID].azurecr.io'
dockerfilePath: './content-api'
tag: '${{ github.run_id }}'
# Jobs define the actions that take place when code is pushed to the master branch
jobs:
build-and-publish-docker-image:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
# Checkout the repo
- uses: actions/checkout@master
- name: Build and push an image to container registry
uses: docker/build-push-action@v1
with:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
path: ${{ env.dockerfilePath }}
dockerfile: '${{ env.dockerfilePath }}/Dockerfile'
registry: ${{ env.containerRegistry }}
repository: ${{ env.imageRepository }}
tags: ${{ env.tag }},latest