generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.3 KB
/
2_pre-Test-Model-Image-Build.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
name: Test Model Image Build
run-name: (2_pre) Test Model Image - "${{ github.event.head_commit.message }}"
# This GitHub Actions workflow builds a Docker image for the
# cfa-epinow2-pipeline-docker project. In-container tests can be added here.
on:
pull_request:
branches:
- main
workflow_dispatch:
schedule:
# Tuesdays at noon GMT time, 24 hours before the prod container is built and deployed
- cron: "0 12 * * 2"
env:
# Together, these form: cfaprdbatchcr.azurecr.io/cfa-epinow2-pipeline
REGISTRY: cfaprdbatchcr.azurecr.io
IMAGE_NAME: cfa-epinow2-pipeline
jobs:
_01_build-model-image:
runs-on: cfa-cdcgov
steps:
- name: Login to the Container Registry
uses: docker/login-action@v3
with:
registry: "cfaprdbatchcr.azurecr.io"
username: "cfaprdbatchcr"
password: ${{ secrets.CFAPRDBATCHCR_REGISTRY_PASSWORD }}
- name: Build and push model pipeline image for Azure batch
id: build_and_push_model_image
uses: docker/build-push-action@v6
with:
push: false # This can be toggled manually for tweaking.
tags: |
${{ env.REGISTRY}}/${{ env.IMAGE_NAME }}:buildtest-latest
${{ env.REGISTRY}}/${{ env.IMAGE_NAME }}:buildtest-${{ github.sha }}
file: ./Dockerfile