Skip to content

Cannot create new stack #4

@3apa3a-b-ta3e

Description

@3apa3a-b-ta3e

Honestly speaking, it's my first experience with this exact action and with Actions in general, so maybe I'm just doing something wrong.
Reason why I chooses your action among others — it supports both TokenAuth and stack creation with file from GIT address.

So, the situation:
I'm trying to push a set of parameters to my Portainer BE v2.17.1 launched on Synology, to create a new stack based on docker-compose.yml stored in my repo, that Portainer have to retrieve.
Already tried the same operation with Portainer's web interface with same user account — worked fine.
Tried with this config from GitHub Actions:

steps:
      - name: portainer
        uses: LGinC/portainer-stack-deploy@master
        with:
          serverurl: ${{ secrets.SYNOLOGY_PORTAINER_URL }}
          access_token: ${{ secrets.SYNOLOGY_PORTAINER_TOKEN }}
          endpointId: 2
          stackname: test-stack
          docker_compose_path: test-stack/docker-compose.yml
          repo_username: ${{ secrets.COMMON_GIT_USERNAME }}
          repo_password: ${{ secrets.SYNOLOGY_PORTAINER_GIT_ACCESS }}

Receiving this error:

Run LGinC/portainer-stack-deploy@master
with:
serverurl: ***
access_token: ***
endpointId: 2
stackname: test-stack
docker_compose_path: test-stack/docker-compose.yml
repo_username: ***
repo_password: ***
/usr/bin/docker run --name ghcriolgincportainerstackdeploy_436ca4 --label 6c0442 --workdir /github/workspace --rm -e "INPUT_SERVERURL" -e "INPUT_ACCESS_TOKEN" -e "INPUT_ENDPOINTID" -e "INPUT_STACKNAME" -e "INPUT_DOCKER_COMPOSE_PATH" -e "INPUT_REPO_USERNAME" -e "INPUT_REPO_PASSWORD" -e "INPUT_USERNAME" -e "INPUT_PASSWORD" -e "INPUT_IMAGENAMES" -e "INPUT_ENV" -e "INPUT_VARIABLES" -e "INPUT_DOCKER_COMPOSE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_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_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -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 "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -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/test-repo/test-repo":"/github/workspace" ghcr.io/lginc/portainer-stack-deploy
create stack failed: Invalid request payload
thread 'main' panicked at 'create stack failed', src/main.rs:284:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Does Invalid request payload means that any of the passing parameters is wrong or missing?

Btw, it works (at least no errors reported) when the stack is already exist on Portainer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions