Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use env_vars #315

Closed
satvikreddy opened this issue Mar 28, 2023 · 2 comments
Closed

Unable to use env_vars #315

satvikreddy opened this issue Mar 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@satvikreddy
Copy link

satvikreddy commented Mar 28, 2023

TL;DR

When passing env_vars in github action config, i get an error: google-github-actions/deploy-appengine failed with: could not find an appyaml in [backend/app.yaml]

The moment i remove env_vars, deployment passes.

Expected behavior

App engine deployment should pass when using env_vars

Observed behavior

App engine deployment works without env_vars, but fails when using env_vars

Action YAML

name: Deploy to staging CI
on:
  push:
    branches:
      - staging

jobs:
  build_deploy_app_engine:
    runs-on: ubuntu-latest
    permissions:
      contents: "read"
      id-token: "write"
    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js 18
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: "npm"
          cache-dependency-path: backend/package-lock.json
      - name: Install dependencies
        run: npm install
        working-directory: backend
      - name: Build
        run: npm run build
        working-directory: backend
      - name: "GCloud Auth"
        uses: "google-github-actions/auth@v1"
        with:
          credentials_json: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
      - name: Deploy
        uses: "google-github-actions/deploy-appengine@v1"
        with:
          project_id: vahanchal--staging
          deliverables: backend/app.yaml
          env_vars: |-
            DATABASE_URL=${{ secrets.DATABASE_URL_STAGING }}
            SLACK_ERROR_CHANNEL_WEBHOOK=${{ secrets.SLACK_ERROR_CHANNEL_WEBHOOK_STAGING }}

Log output

2023-03-28T19:20:12.5424328Z ##[error]google-github-actions/deploy-appengine failed with: could not find an appyaml in [backend/app.yaml]
2023-03-28T19:20:12.5498993Z Post job cleanup.

Additional information

My app.yaml config:
I've also tried without specifying env_variables in app.yaml still no luck

runtime: nodejs18

env: standard
instance_class: F1

automatic_scaling:
  max_instances: 1

env_variables:
  DATABASE_URL: ""
  SLACK_ERROR_CHANNEL_WEBHOOK: ""
@satvikreddy satvikreddy added the bug Something isn't working label Mar 28, 2023
@sethvargo
Copy link
Member

This is fixed in #313, which hasn't been released yet.

@satvikreddy
Copy link
Author

I can confirm that v1.2.6 works!! thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants