-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c8cea2
commit 1683d05
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Streamlit build and push Dockerimage | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "streamlit_dockerimage_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: | | ||
VERSION=$(cat streamlit_dockerimage_version) | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
docker build -t $DOCKER_REGISTRY_HOST/$GCP_PROJECT/docker-repository/derisk-starknet-fe:$VERSION -f Dockerfile.frontend . | ||
- name: Push Docker image | ||
run: | | ||
docker push $DOCKER_REGISTRY_HOST/$GCP_PROJECT/docker-repository/derisk-starknet-fe:${{ env.VERSION }} |