generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (32 loc) · 1.23 KB
/
ci_container.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
name: Build containers CI
on:
workflow_dispatch:
pull_request:
env:
GITHUB_SHA: ${{ github.sha }}
REGISTRY: 283582579564.dkr.ecr.ca-central-1.amazonaws.com/sre-bot
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Audit DNS requests
uses: cds-snc/dns-proxy-action@main
env:
DNS_PROXY_FORWARDTOSENTINEL: "true"
DNS_PROXY_LOGANALYTICSWORKSPACEID: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
DNS_PROXY_LOGANALYTICSSHAREDKEY: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1
- name: Build container
working-directory: ./app
run: |
docker buildx build \
--build-arg git_sha=$GITHUB_SHA \
--build-arg LICENSE_KEY=${{ secrets.MAXMIND_LICENSE }} \
--platform=linux/arm64 \
-t $REGISTRY/sre-bot:$GITHUB_SHA-`date '+%Y-%m-%d'` \
-t $REGISTRY/sre-bot:latest .