lginc / portainer-stack-deploy Goto Github PK
View Code? Open in Web Editor NEWThis action deploy image by portainer
License: MIT License
This action deploy image by portainer
License: MIT License
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 withRUST_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.
Since version 1.0.0 when push to Portainer my stack this error appears :
My config :
- name: deploy to portainer
uses: LGinC/portainer-stack-deploy@latest
with:
serverurl: ****
username: ****
password: ****
endpointId: 1
stackname: ****
docker_compose: ****
/usr/bin/docker run --name ghcriolgincportainerstackdeploy_ea0ef7 --label 7db2d7 --workdir /github/workspace --rm -e SHA -e INPUT_SERVERURL -e INPUT_REPO_USERNAME -e INPUT_REPO_PASSWORD -e INPUT_USERNAME -e INPUT_PASSWORD -e INPUT_ENDPOINTID -e INPUT_STACKNAME -e INPUT_DOCKER_COMPOSE -e INPUT_ACCESS_TOKEN -e INPUT_IMAGENAMES -e INPUT_ENV -e INPUT_VARIABLES -e INPUT_DOCKER_COMPOSE_PATH -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_RUN_ATTEMPT -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_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -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_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/v2/v2":"/github/workspace" ghcr.io/lginc/portainer-stack-deploy
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error
When downgrade to 0.3.1 this error disappears and deploy run as normally.
My config :
- name: deploy to portainer
uses: LGinC/[email protected]
with:
serverurl: ****
username: ****
password: ****
endpointId: 1
registry: ghcr.io
stackname: ****
docker_compose: ****
In 0.3.1 I add "registry" entry -> in 1.0.0 since this enter is deprecated I don't use it.
Do you have an solution for this error ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.