Skip to content

Commit

Permalink
updated env method
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhakkeempa committed Jul 24, 2024
1 parent 5de52e1 commit aa88f4f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/google-cloudrun-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ env:
GAR_LOCATION: '${{ secrets.GAR_LOCATION }}'
SERVICE: '${{ secrets.SERVICE_NAME }}'
REGION: '${{ secrets.REGION }}'
SECRET_ID: '${{ secrets.SECRET_ID }}'
SECRET_NAME: '${{ secrets.SECRET_NAME }}'

jobs:
deploy:
Expand Down Expand Up @@ -119,14 +121,24 @@ jobs:
# allow-unauthenticated: true
# port: 8080

- name: Pull Secrets
id: secrets
- uses: google-github-actions/[email protected]
with:
secrets: |
GEMINI_API_KEY=${{ env.PROJECT_ID }}/projects/${{ env.SECRET_ID }}/secrets/${{ env.SECRET_NAME }}
- name: Deploy to Cloud Run
id: deploy
run: |-
gcloud run deploy ${{ env.SERVICE }} \
--image="${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.SERVICE }}:${{ github.sha }}" \
--region="${{ env.GAR_LOCATION }}" \
--platform=managed \
--allow-unauthenticated \
--port=8080
--port=8080 \
--env-vars=GEMINI_API_KEY=${{ steps.secrets.outputs.GEMINI_API_KEY }} \

# If required, use the Cloud Run url output in later steps
- name: Show Output
Expand Down

0 comments on commit aa88f4f

Please sign in to comment.