-
Notifications
You must be signed in to change notification settings - Fork 75
48 lines (39 loc) · 1.3 KB
/
release.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
name: Streamlit build and push Dockerimage
on:
push:
branches:
- master
paths:
- "apps/legacy_app/streamlit_version"
env:
DOCKER_REGISTRY_HOST: europe-west1-docker.pkg.dev
GCP_PROJECT: carmine-api-381920
jobs:
release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Auth Google Cloud SDK
uses: google-github-actions/auth@v2
with:
project_id: carmine-api-381920
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
project_id: carmine-api-381920
- name: Configure Docker to use gcloud as a credential helper
run: |
gcloud auth configure-docker $DOCKER_REGISTRY_HOST
- name: Build Docker image
id: build
run: |
cd ./apps/legacy_app
VERSION=$(cat streamlit_version)
echo "VERSION=$VERSION" >> $GITHUB_ENV
docker build -t $DOCKER_REGISTRY_HOST/$GCP_PROJECT/docker-repository/derisk-starknet-fe:$VERSION .
- name: Push Docker image
run: |
docker push $DOCKER_REGISTRY_HOST/$GCP_PROJECT/docker-repository/derisk-starknet-fe:${{ env.VERSION }}