You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use env_vars to set three environment variables.
I saw this issue (160) and changed the version to 0.6.0 but the problem persists.
This is my .yml:
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
name: Build and Deploy a Container
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
SERVICE: ${{ secrets.GCP_APP_NAME }}
REGION: us-central1
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Cloud SDK
uses: google-github-actions/setup-gcloud@v0.2.0
with:
project_id: ${{ env.PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true # Set to true to authenticate the Cloud Run action
- name: Authorize Docker push
run: gcloud auth configure-docker
- name: Build and Push Container
run: |-
docker build -t gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }} .
docker push gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v0.6.0
with:
service: ${{ env.SERVICE }}
image: gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}
region: ${{ env.REGION }}
env_vars: MODE_TOKEN=${{ secrets.MODE_TOKEN }},MODE_PASS=${{ secrets.MODE_PASS }},DISC_WEBHOOK_DATACHANNEL=${{ secrets.DISC_WEBHOOK_DATACHANNEL }}
- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}
As you can see, I'm using google-github-actions/deploy-cloudrun@v0.6.0 when deploying to Cloud Run.
But when I check the logs from Github Actions, seems that he is using v0.4.0 instead of v0.6.0:
The env_vars options does not appeared in the logs, just service, image and region.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Hi, no problem!
What I did to solve was to add the secrets directly by Cloud Run Console.
So I'm not working this task anymore.
By the way, thanks for the message.
Thanks for your help. I will close this because seems that what @gustavovalverde proposed makes sense. I'm not working with this anymore, so I can't test it.
Thanks
I'm trying to use
env_vars
to set three environment variables.I saw this issue (160) and changed the version to
0.6.0
but the problem persists.This is my
.yml
:As you can see, I'm using
google-github-actions/deploy-cloudrun@v0.6.0
when deploying to Cloud Run.But when I check the logs from Github Actions, seems that he is using
v0.4.0
instead ofv0.6.0
:The
env_vars
options does not appeared in the logs, justservice
,image
andregion
.Am I doing something wrong?
The text was updated successfully, but these errors were encountered: