serverless / github-action

:zap::octocat: A Github Action for deploying with the Serverless Framework
Apache License 2.0
662 stars 173 forks source link

BUG: Attempted to run an interactive setup in non TTY environment. #77

Open jochman opened 1 year ago

jochman commented 1 year ago

I'm using a very simple workflow:

name: Deploy
on:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: serverless/github-action@v3.1.0
        env:
          SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}

and I'm getting:

Error:
Attempted to run an interactive setup in non TTY environment.
If that's intended, run with the SLS_INTERACTIVE_SETUP_ENABLE=1 environment variable
Emyboy commented 1 year ago

I'm getting same error when tying to create a new project

image

ryanlawson commented 6 months ago

You need to supply arguments with args. The action just runs serverless so it's expecting user input.

name: Deploy
on:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: serverless/github-action@v3.1.0
        args: deploy
        env:
          SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
ryanlawson commented 6 months ago

Created PR #90 to enforce args requirement programmatically.

BGarber42 commented 2 weeks ago

I get this error while using args