Bugfixing portainer API call
This commit is contained in:
@ -12,7 +12,7 @@ env:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: Build and Push Docker Image
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@ -60,7 +60,7 @@ jobs:
|
||||
CURL_OPTS: "-s" # Silent mode
|
||||
|
||||
steps:
|
||||
- name: Deploy Container to Portainer
|
||||
- name: Deploy Container to Portainer via API
|
||||
run: |
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
echo "Starting deployment of image ${{ env.IMAGE_TO_DEPLOY }} as container ${{ env.CONTAINER_NAME }}"
|
||||
@ -95,6 +95,9 @@ jobs:
|
||||
CREATE_PAYLOAD=$(cat <<EOF
|
||||
{
|
||||
"Image": "${{ env.IMAGE_TO_DEPLOY }}",
|
||||
"ExposedPorts": {
|
||||
"${{ env.CONTAINER_PORT }}/tcp": {}
|
||||
},
|
||||
"HostConfig": {
|
||||
"PortBindings": {
|
||||
"${{ env.CONTAINER_PORT }}/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "${{ env.HOST_PORT }}" } ]
|
||||
|
Reference in New Issue
Block a user