netlify / actions

MIT License
375 stars 59 forks source link

Unable to create a new site #44

Open SteveALee opened 3 years ago

SteveALee commented 3 years ago

I want to provide an action so a site can be created for a new repo (created for a github template).

The build action does not wok and as netlify init doesn't have a non interactive mode I can't use it via the cli action :(

here's my test action which just fails with no error

on: workflow_dispatch
name: Initial publish on Netlify

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master

    - name: Publish
      uses: netlify/actions/build@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        NETLIFY_CMD: ls
        NETLIFY_DIR: _site

"ls" is just a command that should not fail for debugging purposes as my normal command did not work

The failing publish output is

1s
Run netlify/actions/build@master
/usr/bin/docker run --name e05f15b83239460886e9b49d33f9d361_893746 --label 442333 --workdir /github/workspace --rm -e GITHUB_TOKEN -e NETLIFY_CMD -e NETLIFY_DIR -e NETLIFY_SITE_ID: -e NETLIFY_BASE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/wai-arrm/wai-arrm":"/github/workspace" 442333:e05f15b83239460886e9b49d33f9d361
Deploying
mikepianka commented 2 years ago

Did you ever find a solution to this? I have a similar scenario and am hitting the same error.

SteveALee commented 2 years ago

No I had to give up. Maybe later version of cli work better?

mikepianka commented 2 years ago

OK thanks. Yeah I may just try to write my own action using the CLI since this isn't working out.