Skip to content

Commit

Permalink
gh actions changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LaeekAhmed committed Mar 30, 2024
1 parent 558e74f commit 50494a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:

- id: 'auth'
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.OWNER_SA_KEY }}

- name: Decode credentials.json
run: echo "${{ secrets.B64_ENCODED_KEY }}" | base64 --decode > credentials.json
run: echo "${{ secrets.B64_ENCODED_KEY }}" | base64 --decode > docker_credentials.json

- name: Install GCloud CLI
uses: google-github-actions/setup-gcloud@v0
uses: google-github-actions/setup-gcloud@v1

- name: Build and Push Backend Docker Image
env:
GOOGLE_PROJECT: ${{ secrets.PROJECT_ID }}
CREDENTIALS_JSON: ${{ secrets.B64_ENCODED_KEY }}
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
docker build --build-arg CREDENTIALS_JSON=./credentials.json -t us-central1-docker.pkg.dev/automate-gdsc/backend-images/backend:latest ./backend
docker build --build-arg CREDENTIALS_JSON=./docker_credentials.json -t us-central1-docker.pkg.dev/automate-gdsc/backend-images/backend:latest ./backend
docker push us-central1-docker.pkg.dev/automate-gdsc/backend-images/backend:latest
- name: Build and Push Frontend Docker Image
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN pip install uvicorn[standard]==0.23.2
# Copy the required files & dir into the container
COPY compute ./compute
COPY big_query.py ./
COPY ${CREDENTIALS_JSON} ./
COPY ${CREDENTIALS_JSON} ./credentials.json

# create dir for the HTML files created during profiling
RUN mkdir tempHTML
Expand Down

0 comments on commit 50494a9

Please sign in to comment.