-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (31 loc) · 1.1 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
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: Build and push image
id: build-push
uses: CDCgov/cfa-actions/[email protected]
with:
container-file-1: ./Containerfile.dependencies
container-file-2: ./Containerfile
first-step-cache-key: docker-dependencies-${{ runner.os }}-${{ hashFiles('./Containerfile.dependencies') }}
registry: ${{ vars.CONTAINER_REGISTRY }}
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
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 }}