From 586b6615e20a0752d5df970054245ab0dc03d58a Mon Sep 17 00:00:00 2001
From: Shane <6071159+smashedr@users.noreply.github.com>
Date: Sun, 28 Sep 2025 20:51:30 -0700
Subject: [PATCH 1/7] Update README.md
---
.github/workflows/labeler.yaml | 3 +-
.github/workflows/lint.yaml | 3 +
.github/workflows/test.yaml | 2 +-
README.md | 139 ++++++++++++++++++++++++---------
4 files changed, 106 insertions(+), 41 deletions(-)
diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml
index e2212d8..b24c014 100644
--- a/.github/workflows/labeler.yaml
+++ b/.github/workflows/labeler.yaml
@@ -5,6 +5,7 @@ on:
permissions:
pull-requests: write
+ issues: write
jobs:
labeler:
@@ -36,7 +37,7 @@ jobs:
- name: "Label Creator"
continue-on-error: true
- uses: cssnr/label-creator-action@master
+ uses: cssnr/label-creator-action@v1
with:
file: .configs/labels/labels.yaml
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml
index e87af07..1eb4786 100644
--- a/.github/workflows/lint.yaml
+++ b/.github/workflows/lint.yaml
@@ -10,6 +10,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions:
+ pull-requests: write
+
jobs:
lint:
name: "Lint"
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 04f334a..fb25d66 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -7,9 +7,9 @@ on:
push:
branches: ["**"]
paths:
+ - ".github/workflows/test.yaml"
- "dist/**"
- "src/**"
- - ".github/workflows/test.yaml"
- "package*.json"
- "requirements*.txt"
- "action.yml"
diff --git a/README.md b/README.md
index 6c279b9..2b6a083 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
[](https://github.com/cssnr/portainer-stack-deploy-action/pulse)
[](https://codeberg.org/cssnr/portainer-stack-deploy-action)
[](https://portainer-deploy.cssnr.com/)
-[](https://github.com/cssnr/portainer-stack-deploy-action/graphs/contributors)
+[](https://github.com/cssnr/portainer-stack-deploy-action/graphs/contributors)
[](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
[](https://github.com/cssnr/portainer-stack-deploy-action/blob/master/src)
[](https://github.com/cssnr/portainer-stack-deploy-action/forks)
@@ -30,8 +30,9 @@
- [Support](#Support)
- [Contributing](#Contributing)
-> [!TIP]
-> ▶️ View the [Getting Started Guide](https://portainer-deploy.cssnr.com/guides/get-started) on the website.
+
+
+
Deploy, Update or Create a Portainer Stack from a Repository or Compose File.
Supports both Swarm and Standalone Docker deployments for Portainer Community and Business Enterprise Edition.
@@ -54,7 +55,11 @@ Make sure to review the [Inputs](#inputs) and checkout additional [Examples](#ex
This is a fairly simple action, for more details see [src/index.js](src/index.js) and [src/portainer.js](src/portainer.js).
-_No Portainer? You can deploy directly to Docker Swarm or Compose over SSH with: [cssnr/stack-deploy-action](https://github.com/cssnr/stack-deploy-action)_
+_No Portainer? You can deploy directly to Docker Swarm or Compose over SSH with: [cssnr/stack-deploy-action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
+or [cssnr/docker-context-action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)._
+
+> [!TIP]
+> ▶️ View the [Getting Started Guide](https://portainer-deploy.cssnr.com/guides/get-started) on the website.
## Features
@@ -74,46 +79,58 @@ You can [get started here](https://portainer-deploy.cssnr.com/guides/get-started
> [!IMPORTANT]
> Visit the [Documentation Site](https://portainer-deploy.cssnr.com/) for comprehensive, up-to-date documentation.
-| Input | Req. | Default Value | Input Description |
-| :----------- | :-----: | :-------------------- | :----------------------- |
-| `name` | **Yes** | - | Stack Name |
-| `url` | **Yes** | - | Portainer URL |
-| `token` | **Yes** | - | Portainer Token \* |
-| `file` | - | `docker-compose.yaml` | Compose File |
-| `endpoint` | - | `endpoints[0].Id` | Portainer Endpoint \* |
-| `ref` | - | `current reference` | Repository Ref \* |
-| `repo` | - | `current repository` | Repository URL \* |
-| `tlsskip` | - | `false` | Skip Repo TLS Verify |
-| `prune` | - | `true` | Prune Services |
-| `pull` | - | `true` | Pull Images |
-| `type` | - | `repo` | Type [`repo`, `file`] \* |
-| `standalone` | - | `false` | Deploy Standalone Stack |
-| `env_json` | - | - | Dotenv JSON Data \*\* |
-| `env_file` | - | - | Dotenv File Path \* |
-| `merge_env` | - | `false` | Merge Env Vars \* |
-| `username` | - | - | Repository Username \* |
-| `password` | - | - | Repository Password \* |
-| `fs_path` | - | - | Relative Path (BE) \* |
-| `headers` | - | `"{}"` | Custom Headers JSON \* |
-| `summary` | - | `true` | Add Summary to Job \* |
+| Input | Default Value | Input Description |
+| :---------------------------- | :-------------------- | :---------------------- |
+| `name` | **Required** | Stack Name |
+| `url` | **Required** | Portainer URL |
+| [token](#token) | **Required** | Portainer Token |
+| `file` | `docker-compose.yaml` | Compose File |
+| [endpoint](#endpoint) | `endpoints[0].Id` | Portainer Endpoint |
+| [ref](#ref) | `current reference` | Repository Ref |
+| [repo](#repo) | `current repository` | Repository URL |
+| `tlsskip` | `false` | Skip Repo TLS Verify |
+| `prune` | `true` | Prune Services |
+| `pull` | `true` | Pull Images |
+| [type](#type) | `repo` | Type [`repo`, `file`] |
+| `standalone` | `false` | Deploy Standalone Stack |
+| [env_json](#env_jsonenv_file) | - | Dotenv JSON Data\* |
+| [env_file](#env_jsonenv_file) | - | Dotenv File Path |
+| [merge_env](#merge_env) | `false` | Merge Env Vars |
+| [username](#usernamepassword) | - | Repository Username |
+| [password](#usernamepassword) | - | Repository Password |
+| [fs_path](#fs_path) | - | Relative Path (BE) |
+| [headers](#headers) | `"{}"` | Custom Headers JSON |
+| [summary](#summary) | `true` | Add Summary to Job |
> For more details, see the [Inputs Documentation](https://portainer-deploy.cssnr.com/docs/inputs)
> and [Portainer API Documentation](https://app.swaggerhub.com/apis/portainer/portainer-ce/).
-**token:** To create a Portainer API token see: https://docs.portainer.io/api/access
+#### token
-**endpoint:** If `endpoint` is not provided the first endpoint returned by the API will be used.
+To create a Portainer API token see: https://docs.portainer.io/api/access
+
+#### endpoint
+
+If `endpoint` is not provided the first endpoint returned by the API will be used.
If you only have one endpoint, this will work as expected, otherwise, you should provide an endpoint.
-**ref:** If you want to deploy a different ref than the one triggering the workflow.
+#### ref
+
+If you want to deploy a different ref than the one triggering the workflow.
Useful if you are deploying from another repository. Example: `refs/heads/master`
-**repo:** This defaults to the repository running the action. If you want to deploy a different repository
+#### repo
+
+This defaults to the repository running the action. If you want to deploy a different repository
put the full http URL to that repository here.
-**type:** Type of Deployment. Currently, supports either `repo` or `file`.
+#### type
-**env_json/env_file:** Optional environment variables used when creating the stack. File should be in dotenv format and
+Type of Deployment. Currently, supports either `repo` or `file`.
+
+#### env_json/env_file
+
+Optional environment variables used when creating the stack. File should be in dotenv format and
JSON should be an object. Example: `{"KEY": "Value"}`
> [!WARNING]
@@ -121,17 +138,25 @@ JSON should be an object. Example: `{"KEY": "Value"}`
> Using `env_json` on a public repository will otherwise expose this data.
> To securely pass an environment use the `env_file` option.
-**merge_env:** If this is `true` and the stack exists, will update the existing Env with the provided `env_json/env_file`.
+#### merge_env
+
+If this is `true` and the stack exists, will update the existing Env with the provided `env_json/env_file`.
If you are not providing an env, the existing env will be used, and you do not need to set this.
-**username/password:** Only set these if the `repo` is private and requires authentication.
+#### username/password
+
+Only set these if the `repo` is private and requires authentication.
This is NOT the Portainer username/password, see `token` for Portainer authentication.
-**fs_path:** Relative Path Support for Portainer BE.
+#### fs_path
+
+Relative Path Support for Portainer BE.
Set this to enable relative path volumes support for volume mappings in your compose file.
See the [docs](https://docs.portainer.io/advanced/relative-paths) for more info.
-**headers:** Custom Headers in **JSON format** for services like Cloudflare Zero Trust.
+#### headers
+
+Custom Headers in **JSON format** for services like Cloudflare Zero Trust.
The `headers` are parsed with JSON.parse and passed directly to axios:
`headers: { 'X-API-Key': token, ...JSON.parse(headers) }`
@@ -154,7 +179,9 @@ The `headers` are parsed with JSON.parse and passed directly to axios:
-**summary:** Write a Summary for the job. To disable this set to `false`.
+#### summary
+
+Write a Summary for the job. To disable this set to `false`.
To view a workflow run, click on a recent [Test](https://github.com/cssnr/portainer-stack-deploy-action/actions/workflows/test.yaml) job _(requires login)_.
@@ -515,19 +542,53 @@ and [additional](https://cssnr.com/) open source projects.
Additionally, you can support other GitHub Actions I have published:
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
-- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
+- [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
+- [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)
- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
+- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
+- [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
-- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
- [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)
- [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)
- [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)
- [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)
- [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)
+- [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)
+- [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)
+- [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)
+
+❔ Unpublished Actions
+
+These actions are not published on the Marketplace, but may be useful.
+
+- [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.
+- [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.
+- [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.
+- [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.
+- [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.
+
+---
+
+📝 Template Actions
+
+These are basic action templates that I use for creating new actions.
+
+- [js-test-action](https://github.com/smashedr/js-test-action?tab=readme-ov-file#readme) - JavaScript
+- [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Python
+- [ts-test-action](https://github.com/smashedr/ts-test-action?tab=readme-ov-file#readme) - TypeScript
+- [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker Image
+
+Note: The `docker-test-action` builds, runs and pushes images to [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).
+
+---
+
+
-
+
+
+ Deploy, Update or Create a Portainer Stack from a Repository or Compose File. Supports both Swarm and Standalone Docker deployments for Portainer Community and Business Enterprise Edition. From 46edc069d651906a5bd51f0830028bc0ce86b6c6 Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Sun, 28 Sep 2025 21:31:01 -0700 Subject: [PATCH 5/7] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e39b16e..5edea3b 100644 --- a/README.md +++ b/README.md @@ -81,18 +81,18 @@ You can [get started here](https://portainer-deploy.cssnr.com/guides/get-started | Input | Default Value | Description of Input | | :---------------------------- | :-------------------- | :----------------------------- | -| `name` | Required | Stack Name | -| `url` | Required | Portainer URL | -| [token](#token) | Required | Portainer Token | -| `file` | `docker-compose.yaml` | Compose File | +| **name** | _Required_ | Stack Name | +| **url** | _Required_ | Portainer URL | +| [token](#token) | _Required_ | Portainer Token | +| **file** | `docker-compose.yaml` | Compose File | | [endpoint](#endpoint) | `endpoints[0].Id` | Portainer Endpoint | | [ref](#ref) | `current reference` | Repository Ref | | [repo](#repo) | `current repository` | Repository URL | -| `tlsskip` | `false` | Skip Repo TLS Verify | -| `prune` | `true` | Prune Services | -| `pull` | `true` | Pull Images | +| **tlsskip** | `false` | Skip Repo TLS Verify | +| **prune** | `true` | Prune Services | +| **pull** | `true` | Pull Images | | [type](#type) | `repo` | Type [`repo`, `file`] | -| `standalone` | `false` | Deploy Standalone Stack | +| **standalone** | `false` | Deploy Standalone Stack | | [env_json](#env_jsonenv_file) | - | Dotenv JSON Data | | [env_file](#env_jsonenv_file) | - | Dotenv File Path | | [merge_env](#merge_env) | `false` | Merge Env Vars | From 8ccc07374bef10c2a8aa0ab87e8e1878496d935c Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Sun, 28 Sep 2025 21:44:43 -0700 Subject: [PATCH 6/7] Update README.md --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 5edea3b..9216da1 100644 --- a/README.md +++ b/README.md @@ -79,28 +79,28 @@ You can [get started here](https://portainer-deploy.cssnr.com/guides/get-started > [!IMPORTANT] > Visit the [Documentation Site](https://portainer-deploy.cssnr.com/) for comprehensive, up-to-date documentation. -| Input | Default Value | Description of Input | -| :---------------------------- | :-------------------- | :----------------------------- | -| **name** | _Required_ | Stack Name | -| **url** | _Required_ | Portainer URL | -| [token](#token) | _Required_ | Portainer Token | -| **file** | `docker-compose.yaml` | Compose File | -| [endpoint](#endpoint) | `endpoints[0].Id` | Portainer Endpoint | -| [ref](#ref) | `current reference` | Repository Ref | -| [repo](#repo) | `current repository` | Repository URL | -| **tlsskip** | `false` | Skip Repo TLS Verify | -| **prune** | `true` | Prune Services | -| **pull** | `true` | Pull Images | -| [type](#type) | `repo` | Type [`repo`, `file`] | -| **standalone** | `false` | Deploy Standalone Stack | -| [env_json](#env_jsonenv_file) | - | Dotenv JSON Data | -| [env_file](#env_jsonenv_file) | - | Dotenv File Path | -| [merge_env](#merge_env) | `false` | Merge Env Vars | -| [username](#usernamepassword) | - | Repository Username | -| [password](#usernamepassword) | - | Repository Password | -| [fs_path](#fs_path) | - | Relative Path (BE) | -| [headers](#headers) | `"{}"` | Custom Headers JSON | -| [summary](#summary) | `true` | Add Summary to Job | +| Input | Default Value | Description of Input | +| :------------- | :-------------------- | :------------------------------------------ | +| **name** | _Required_ | Stack Name | +| **url** | _Required_ | Portainer URL | +| **token** | _Required_ | Portainer Token [⤵️](#token) | +| **file** | `docker-compose.yaml` | Compose File | +| **endpoint** | `endpoints[0].Id` | Portainer Endpoint [⤵️](#endpoint) | +| **ref** | `current reference` | Repository Ref [⤵️](#ref) | +| **repo** | `current repository` | Repository URL [⤵️](#repo) | +| **tlsskip** | `false` | Skip Repo TLS Verify | +| **prune** | `true` | Prune Services | +| **pull** | `true` | Pull Images | +| **type** | `repo` | Type [`repo`, `file`] [⤵️](#type) | +| **standalone** | `false` | Deploy Standalone Stack | +| **env_json** | - | Dotenv JSON Data [⤵️](#env_jsonenv_file) | +| **env_file** | - | Dotenv File Path [⤵️](#env_jsonenv_file) | +| **merge_env** | `false` | Merge Env Vars [⤵️](#merge_env) | +| **username** | - | Repository Username [⤵️](#usernamepassword) | +| **password** | - | Repository Password [⤵️](#usernamepassword) | +| **fs_path** | - | Relative Path (BE) [⤵️](#fs_path) | +| **headers** | `"{}"` | Custom Headers JSON [⤵️](#headers) | +| **summary** | `true` | Add Summary to Job [⤵️](#summary) | > For more details, see the [Inputs Documentation](https://portainer-deploy.cssnr.com/docs/inputs) > and [Portainer API Documentation](https://app.swaggerhub.com/apis/portainer/portainer-ce/). From 3504948dc0691335b7ec3312f6cebdb942110e0d Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Sun, 28 Sep 2025 21:47:30 -0700 Subject: [PATCH 7/7] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9216da1..ca01ca6 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,9 @@ Includes most [features](#features) including file or repo deploy, deploy from o This action is written from the ground up in Vanilla JavaScript and is not a fork/clone of existing actions. You can view an [Action Comparison](https://portainer-deploy.cssnr.com/guides/features#action-comparison) of all available actions on the website. +> [!TIP] +> ▶️ View the [Getting Started Guide](https://portainer-deploy.cssnr.com/guides/get-started) on the website. + ```yaml - name: 'Portainer Deploy' uses: cssnr/portainer-stack-deploy-action@v1 @@ -58,9 +61,6 @@ This is a fairly simple action, for more details see [src/index.js](src/index.js _No Portainer? You can deploy directly to Docker Swarm or Compose over SSH with: [cssnr/stack-deploy-action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme) or [cssnr/docker-context-action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)._ -> [!TIP] -> ▶️ View the [Getting Started Guide](https://portainer-deploy.cssnr.com/guides/get-started) on the website. - ## Features - Deploy or re-deploy an existing stack otherwise create a new stack. @@ -79,7 +79,7 @@ You can [get started here](https://portainer-deploy.cssnr.com/guides/get-started > [!IMPORTANT] > Visit the [Documentation Site](https://portainer-deploy.cssnr.com/) for comprehensive, up-to-date documentation. -| Input | Default Value | Description of Input | +| Input | Default Value | Description of the Input | | :------------- | :-------------------- | :------------------------------------------ | | **name** | _Required_ | Stack Name | | **url** | _Required_ | Portainer URL |