-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (36 loc) · 1.24 KB
/
containers.yaml
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
name: Create Docker Image
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
IMAGE_NAME: pyrenew-hew
jobs:
build-and-push-image:
runs-on: cfa-cdcgov
name: Build and push image
steps:
- name: Login to Azure
id: azure_login_2
uses: azure/login@v2
with:
creds: ${{ secrets.EDAV_STF_SERVICE_PRINCIPAL }}
- name: Login to ACR
run: az acr login --name ${{ vars.CONTAINER_REGISTRY_NAME }}
- name: Build and push image
id: build-push
uses: CDCgov/cfa-actions/[email protected]
with:
registry: ${{ vars.CONTAINER_REGISTRY_NAME }}.azurecr.io/
container-file-1: ./Containerfile.dependencies
container-file-2: ./Containerfile
first-step-cache-key: docker-dependencies-${{ runner.os }}-${{ hashFiles('./Containerfile.dependencies') }}
image: ${{ env.IMAGE_NAME }}
build-args-2: |
TAG=${{ steps.image.outputs.tag }}
GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha || github.sha }}
GIT_BRANCH_NAME=${{ steps.branch.outputs.name }}