Skip to content

Unable to deploy using working_directory/deliverables #259

@drummerjolev

Description

@drummerjolev

TL;DR

Cannot deploy Express app when in a sub-directory e.g. server/app.js

I unsuccessfully tried to:

  • set the working_directory variable with relative/absolute paths
  • set the deliverables variable with relative/absolute paths

Expected behavior

Successful deployment to Google App Engine

Observed behavior

Screenshot 2022-05-07 at 12 23 41

Screenshot 2022-05-07 at 12 24 02

Screenshot 2022-05-07 at 12 24 30

Action YAML

name: Deploy to Google App Engine on merge
on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: start deployment
        uses: bobheadxi/deployments@v1
        id: deployment
        with:
          step: start
          token: ${{ secrets.GITHUB_TOKEN }}
          env: release

      - id: 'auth'
        uses: 'google-github-actions/auth@v0'
        with:
          credentials_json: '${{ secrets.GCP_SA_KEY }}'

      - id: 'gae-deploy'
        uses: 'google-github-actions/deploy-appengine@v0'
        with:
          deliverables: server/app.yaml
          promote: true

      - name: update deployment status
        uses: bobheadxi/deployments@v1
        if: always()
        with:
          step: finish
          token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          env: ${{ steps.gae-deploy.outputs.url }}
          deployment_id: ${{ steps.deployment.outputs.deployment_id }}

Log output

2022-05-07T10:42:20.6079859Z Requested labels: ubuntu-latest
2022-05-07T10:42:20.6079918Z Job defined at: drummerjolev/real-estate-tools/.github/workflows/deploy-appengine.yaml@refs/heads/master
2022-05-07T10:42:20.6079939Z Waiting for a runner to pick up this job...
2022-05-07T10:42:20.9916186Z Job is waiting for a hosted runner to come online.
2022-05-07T10:42:24.1377400Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2022-05-07T10:42:27.4504467Z Current runner version: '2.291.1'
2022-05-07T10:42:27.4533010Z ##[group]Operating System
2022-05-07T10:42:27.4533782Z Ubuntu
2022-05-07T10:42:27.4534308Z 20.04.4
2022-05-07T10:42:27.4534752Z LTS
2022-05-07T10:42:27.4535221Z ##[endgroup]
2022-05-07T10:42:27.4535743Z ##[group]Virtual Environment
2022-05-07T10:42:27.4536297Z Environment: ubuntu-20.04
2022-05-07T10:42:27.4536855Z Version: 20220503.1
2022-05-07T10:42:27.4537593Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220503.1/images/linux/Ubuntu2004-Readme.md
2022-05-07T10:42:27.4538508Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220503.1
2022-05-07T10:42:27.4539193Z ##[endgroup]
2022-05-07T10:42:27.4539725Z ##[group]Virtual Environment Provisioner
2022-05-07T10:42:27.4540269Z 1.0.0.0-main-20220421-1
2022-05-07T10:42:27.4540773Z ##[endgroup]
2022-05-07T10:42:27.4542297Z ##[group]GITHUB_TOKEN Permissions
2022-05-07T10:42:27.4543168Z Actions: write
2022-05-07T10:42:27.4543764Z Checks: write
2022-05-07T10:42:27.4544337Z Contents: write
2022-05-07T10:42:27.4544833Z Deployments: write
2022-05-07T10:42:27.4545352Z Discussions: write
2022-05-07T10:42:27.4545838Z Issues: write
2022-05-07T10:42:27.4546304Z Metadata: read
2022-05-07T10:42:27.4546813Z Packages: write
2022-05-07T10:42:27.4547299Z Pages: write
2022-05-07T10:42:27.4547776Z PullRequests: write
2022-05-07T10:42:27.4548330Z RepositoryProjects: write
2022-05-07T10:42:27.4548856Z SecurityEvents: write
2022-05-07T10:42:27.4549453Z Statuses: write
2022-05-07T10:42:27.4549931Z ##[endgroup]
2022-05-07T10:42:27.4553821Z Secret source: Actions
2022-05-07T10:42:27.4554809Z Prepare workflow directory
2022-05-07T10:42:27.5386515Z Prepare all required actions
2022-05-07T10:42:27.5569619Z Getting action download info
2022-05-07T10:42:27.8610719Z Download action repository 'bobheadxi/deployments@v1' (SHA:b0db96170b843c3c786ed42a046d869c50efe3cd)
2022-05-07T10:42:28.4571687Z Download action repository 'google-github-actions/auth@v0' (SHA:b258a9f230b36c9fa86dfaa43d1906bd76399edb)
2022-05-07T10:42:28.9701863Z Download action repository 'google-github-actions/deploy-appengine@v0' (SHA:c0374ce7602000a1b1dbcf28f7a4ab4361464b5f)
2022-05-07T10:42:29.7135490Z ##[group]Run bobheadxi/deployments@v1
2022-05-07T10:42:29.7135927Z with:
2022-05-07T10:42:29.7136232Z   step: start
2022-05-07T10:42:29.7136799Z   token: ***
2022-05-07T10:42:29.7137103Z   env: release
2022-05-07T10:42:29.7137402Z   debug: false
2022-05-07T10:42:29.7137717Z   auto_inactive: false
2022-05-07T10:42:29.7138034Z ##[endgroup]
2022-05-07T10:42:29.8847528Z targeting drummerjolev/real-estate-tools
2022-05-07T10:42:29.8927951Z initializing new deployment for release @ refs/heads/master
2022-05-07T10:42:30.2343269Z created deployment 560070019 for release @ refs/heads/master
2022-05-07T10:42:30.5355749Z created deployment status 1027976324 with status "in_progress"
2022-05-07T10:42:30.5356458Z 
2022-05-07T10:42:30.5415573Z 
2022-05-07T10:42:30.5416480Z 
2022-05-07T10:42:30.5628942Z ##[group]Run google-github-actions/auth@v0
2022-05-07T10:42:30.5629364Z with:
2022-05-07T10:42:30.5635144Z   credentials_json: ***
2022-05-07T10:42:30.5635520Z   create_credentials_file: true
2022-05-07T10:42:30.5635894Z   export_environment_variables: true
2022-05-07T10:42:30.5636261Z   cleanup_credentials: true
2022-05-07T10:42:30.5636612Z   access_token_lifetime: 3600s
2022-05-07T10:42:30.5637066Z   access_token_scopes: https://www.googleapis.com/auth/cloud-platform
2022-05-07T10:42:30.5637510Z   id_token_include_email: false
2022-05-07T10:42:30.5637838Z ##[endgroup]
2022-05-07T10:42:30.6340368Z ##[warning]The "create_credentials_file" option is true, but the current GitHub workspace is empty. Did you forget to use "actions/checkout" before this step? If you do not intend to share authentication with future steps in this job, set "create_credentials_file" to false.
2022-05-07T10:42:30.6357732Z Created credentials file at "/home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json"
2022-05-07T10:42:30.6358511Z 
2022-05-07T10:42:30.6365925Z 
2022-05-07T10:42:30.6508159Z ##[group]Run google-github-actions/deploy-appengine@v0
2022-05-07T10:42:30.6508671Z with:
2022-05-07T10:42:30.6509170Z   working_directory: server/
2022-05-07T10:42:30.6509662Z   promote: true
2022-05-07T10:42:30.6510073Z env:
2022-05-07T10:42:30.6510722Z   CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: /home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json
2022-05-07T10:42:30.6511609Z   GOOGLE_APPLICATION_CREDENTIALS: /home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json
2022-05-07T10:42:30.6512387Z   GOOGLE_GHA_CREDS_PATH: /home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json
2022-05-07T10:42:30.6513024Z   CLOUDSDK_CORE_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.6513535Z   CLOUDSDK_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.6514071Z   GCLOUD_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.6515063Z   GCP_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.6515688Z   GOOGLE_CLOUD_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.6516156Z ##[endgroup]
2022-05-07T10:42:30.7154293Z ##[error]google-github-actions/deploy-appengine failed with: ENOENT: no such file or directory, chdir '/home/runner/work/real-estate-tools/real-estate-tools' -> 'server/'
2022-05-07T10:42:30.7385635Z ##[group]Run bobheadxi/deployments@v1
2022-05-07T10:42:30.7385993Z with:
2022-05-07T10:42:30.7386260Z   step: finish
2022-05-07T10:42:30.7386776Z   token: ***
2022-05-07T10:42:30.7387064Z   status: failure
2022-05-07T10:42:30.7387382Z   deployment_id: 560070019
2022-05-07T10:42:30.7387702Z   debug: false
2022-05-07T10:42:30.7388012Z   auto_inactive: false
2022-05-07T10:42:30.7388307Z env:
2022-05-07T10:42:30.7388831Z   CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: /home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json
2022-05-07T10:42:30.7389535Z   GOOGLE_APPLICATION_CREDENTIALS: /home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json
2022-05-07T10:42:30.7390191Z   GOOGLE_GHA_CREDS_PATH: /home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json
2022-05-07T10:42:30.7390713Z   CLOUDSDK_CORE_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.7391134Z   CLOUDSDK_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.7391684Z   GCLOUD_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.7392081Z   GCP_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.7392491Z   GOOGLE_CLOUD_PROJECT: real-estate-tools-349510
2022-05-07T10:42:30.7392959Z   CLOUDSDK_METRICS_ENVIRONMENT: github-actions-deploy-appengine
2022-05-07T10:42:30.7393365Z ##[endgroup]
2022-05-07T10:42:30.8968687Z 
2022-05-07T10:42:30.8972717Z /home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/node_modules/@actions/core/lib/core.js:110
2022-05-07T10:42:30.8974784Z         throw new Error(`Input required and not supplied: $***name***`);
2022-05-07T10:42:30.8975667Z ^
2022-05-07T10:42:30.8976299Z Error: Input required and not supplied: env
2022-05-07T10:42:30.8977319Z     at getInput (/home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/node_modules/@actions/core/lib/core.js:110:1)
2022-05-07T10:42:30.8978257Z     at getRequiredInput (/home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/src/lib/input.ts:18:1)
2022-05-07T10:42:30.8979378Z     at collectDeploymentContext (/home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/src/lib/context.ts:29:1)
2022-05-07T10:42:30.8980260Z     at context (/home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/src/main.ts:7:1)
2022-05-07T10:42:30.8981310Z     at context (/home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/src/main.ts:14:1)
2022-05-07T10:42:30.8982193Z     at Object.<anonymous> (/home/runner/work/_actions/bobheadxi/deployments/v1/webpack:/@bobheadxi/deployments/src/main.ts:14:1)
2022-05-07T10:42:30.8983481Z     at Module._compile (node:internal/modules/cjs/loader:1101:14)
2022-05-07T10:42:30.8984260Z     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
2022-05-07T10:42:30.8985136Z     at Module.load (node:internal/modules/cjs/loader:981:32)
2022-05-07T10:42:30.8985829Z     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-05-07T10:42:30.9055668Z Post job cleanup.
2022-05-07T10:42:30.9706159Z Removed exported credentials at "/home/runner/work/real-estate-tools/real-estate-tools/gha-creds-a1b7e50c08d40aa6.json".
2022-05-07T10:42:30.9880149Z Cleaning up orphan processes

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions