Giter Club home page Giter Club logo

publish-gae-action's People

Contributors

dependabot[bot] avatar micimize avatar msng avatar r115 avatar seupedro avatar zxyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mason-stewart

publish-gae-action's Issues

Trouble with client-secret.json

Hi all,
quick question which is not really an issue:
Is the client-secret.json the key for the service account? If yes, why did we set up the key in the secret? Should it be used like so:

gcloud auth activate-service-account ${{ secrets.GCP_SA_EMAIL }} --key-file=${{ secrets.GCP_SA_KEY }}

I am having a bit of trouble to understand the doc here.

How to create the service account file from secret key?

I want to use this template to depoy my Docker container to Google Cloud App Engine.
https://github.com/steinko/lumdb/blob/master/.github/workflows/google.yml
I have place the service account key an email as secret keys
https://github.com/steinko/lumdb/settings/secrets
A errr occure when GIthub execute the Github Action
ERROR: (gcloud.auth.activate-service-account) Unable to read file [client-secret.json]: [Errno 2] No such file or directory: 'client-secret.json'
##[error]Process completed with exit code 1.

https://github.com/steinko/lumdb/runs/428578324

What must I do to get the data from the service accout key to the client-secret.json?

ERROR: (gcloud.auth.activate-service-account) Unable to read file [client-secret.json]: [Errno 2] No such file or directory: 'client-secret.json'

This is the error Iโ€™m getting:

ERROR: (gcloud.auth.activate-service-account) Unable to read file [client-secret.json]: [Errno 2] No such file or directory: 'client-secret.json'
##[error]Process completed with exit code 1.

This is my structure:

server
|-> index.js
|-> app.yaml
|-> package.json
|-> package-lock.json

This is my workflow file:

name: Build and Deploy
on:
  push:
    branches:
      - server

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
      - name: Install Dependencies
        run: npm install
        working-directory: ./server
  deploy:
    name: Deploy
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
      - name: Initialize Google Cloud SDK
        uses: zxyle/publish-gae-action@master
        with:
          service_account_email: ${{ secrets.GCP_SA_EMAIL }}
          service_account_key: ${{ secrets.GCP_SA_KEY }}
          project_id: ${{ secrets.PROJECT_ID }}
          gae_config_path: ./server/app.yaml
      - name: Publish app to Google App Engine
        run: | 
          # This client-secret.json is converted by GCP_SA_KEY.
          gcloud auth activate-service-account ${{ secrets.GCP_SA_EMAIL }} --key-file=client-secret.json
          gcloud config set project ${{ secrets.PROJECT_ID }}
          gcloud -q app deploy app.yaml --promote
        working-directory: ./server

ENOENT: no such file or directory, open './app.yaml'

My workflow


on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  deploy:
    
    runs-on: ubuntu-latest
    
    steps:
    - name: Initialize Google Cloud SDK
      uses: zxyle/publish-gae-action@master
      with:
        service_account_email: ${{ secrets.GCP_SA_EMAIL }}
        service_account_key: ${{ secrets.GCP_SA_KEY }}
        project_id: ${{ secrets.PROJECT_ID }}

    - name: Publish app to Google App Engine
      run: |
        # This client-secret.json is converted by GCP_SA_KEY.
        gcloud auth activate-service-account ${{ secrets.GCP_SA_EMAIL }} --key-file=client-secret.json
        gcloud config set project ${{ secrets.PROJECT_ID }}
        gcloud -q app deploy app.yaml --promote
        # Suppose you need a cron task.
        gcloud -q app deploy cron.yaml

My app.yaml
image

How to hide env variables from Google App Engine dashboard.

This action works great for me and I wanted to start a quick thread to see if anyone has figured out how to hide the secret env variables in the App Engine dashboard as seen in the attached screenshot.

Has anybody figured out how to prevent Google App Engine from printing the environment variables in the dashboard that are written to the app.yaml? Seems odd they make it so difficult to hide and use secret keys in app engine ๐Ÿ˜….

Dashboard_โ€“_App_Engine_โ€“_Maple_โ€“_Google_Cloud_Platform_and_php_-_s3_direct_upload_restricting_file_size_and_type_-_Stack_Overflow_and_maple_โ€”_-bash_โ€”_150ร—44

Output Deploy

i wonder how can we get the output of the deploy url. Could you help me to figure out that

File `./app.yml` not found

I get this error:

##[error]ENOENT: no such file or directory, open './app.yaml'

The file is under ./backend/src/main/appengine/app.yml starting from the repository root, but copying it to ./app.yml didn't fix the issue.

Where is this file supposed to be? Could you maybe add a configuration option to specify the file path?


My full workflow:

# GitHub actions

name: Deploy to App Engine (GCP)
on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    name: Deployment
    runs-on: ubuntu-latest
    steps:
      - name: Initialize Google Cloud SDK
        uses: zxyle/publish-gae-action@master
        with:
          service_account_email: ${{ secrets.GCP_SA_EMAIL }}
          service_account_key: ${{ secrets.GCP_SA_KEY }}
          project_id: ${{ secrets.PROJECT_ID }}
          # An optional variables parameter can be used
          gae_variables: ${{ secrets.GAE_VARIABLES }}

      [remaining steps omitted]

Input `gae_config_path` doesn't work

When I pass gae_config_path input

uses: zxyle/publish-gae-action@master
with:
  service_account_email: ${{ secrets.GCP_SA_EMAIL }}
  service_account_key: ${{ secrets.GCP_SA_KEY }}
  project_id: ${{ secrets.PROJECT_ID }}
  gae_config_path: ./packages/my-project

I get this error:

##[warning]Unexpected input 'gae_config_path', valid inputs are ['service_account_email', 'service_account_key', 'project_id', 'gae_variables']

action.yml doesn't include this input. That might be the issue.

YAML errors on usage?

Is the text shown in usage supposed to be pasted into a yml file under workflows directly, or does some formatting need to go around it? I get an error from the parser about a list being found instead of an object when I do that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.