-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.43 KB
/
artifact.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
45
46
47
48
49
50
51
52
name: Build and Push Docker Images to Artifact Registry
on:
push:
branches:
- master
tags:
- "*"
env:
PROJECT_ID: open-targets-eu-dev
REGION: europe-west1
GAR_LOCATION: europe-west1-docker.pkg.dev/open-targets-eu-dev/ot-release-metrics
jobs:
build-push-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
- name: Configure Docker for Google Artifact Registry
run: gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
- name: Set up QEMU for Multi-Architecture Builds
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Metric Calculation Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: ${{ env.GAR_LOCATION }}/metric-calculation:latest
context: .
file: metric-calculation/Dockerfile
- name: Build and Push Streamlit App Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: ${{ env.GAR_LOCATION }}/app:latest
context: .
file: streamlit-app/Dockerfile