Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 9 additions & 27 deletions .github/workflows/check-build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: "Check Build"

on:
push:
branches: [master]
pull_request_target:
paths:
- "dist/**"
- "src/**"
- "package*.json"
- "rollup.config.*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -24,24 +31,12 @@ jobs:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"

- name: "Check Changed Files"
id: changed
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
with:
files: |
dist/**
src/**
package*.json
rollup.config.*

- name: "Checkout Pull"
if: ${{ steps.changed.outputs.any_changed == 'true' }}
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: "Debug"
if: ${{ steps.changed.outputs.any_changed == 'true' }}
continue-on-error: true
run: |
echo "::group::ls"
Expand All @@ -51,18 +46,5 @@ jobs:
tree .
echo "::endgroup::"

#- name: "Setup Node"
# if: ${{ steps.changed.outputs.any_changed == 'true' }}
# uses: actions/setup-node@v6
# with:
# node-version: 24
#
#- name: "Install"
# if: ${{ steps.changed.outputs.any_changed == 'true' }}
# id: install
# run: |
# npm ci

- name: "Check Build Action"
if: ${{ steps.changed.outputs.any_changed == 'true' }}
uses: cssnr/check-build-action@v1
uses: cssnr/check-build-action@latest
8 changes: 6 additions & 2 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: "PR Labeler"
on:
pull_request_target:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
labeler:
name: "Labeler"
Expand All @@ -15,7 +19,7 @@ jobs:

steps:
- name: "Checkout Configs"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: cssnr/configs
ref: master
Expand All @@ -37,7 +41,7 @@ jobs:

- name: "Label Creator"
continue-on-error: true
uses: cssnr/label-creator-action@v1
uses: cssnr/label-creator-action@latest
with:
file: .configs/labels/labels.yaml

Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ concurrency:
jobs:
lint:
name: "Lint"
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}
runs-on: ubuntu-latest
timeout-minutes: 5

permissions:
pull-requests: write
statuses: write
checks: write

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: "Setup Node 24"
uses: actions/setup-node@v6
Expand All @@ -37,7 +40,7 @@ jobs:
id: eslint
if: ${{ !cancelled() }}
run: |
npm run lint:report
npm run lint

- name: "Prettier"
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -75,11 +78,7 @@ jobs:
run: |
yq -e '.runs.main | test("^dist/")' action.yml

#- name: "Check Build Action"
# if: ${{ !cancelled() }}
# uses: cssnr/check-build-action@v1

- name: "ESLint Annotate"
if: ${{ !cancelled() && steps.eslint.outcome != 'success' }}
continue-on-error: true
uses: ataylorme/eslint-annotate-action@v3
#- name: "ESLint Annotate"
# if: ${{ !cancelled() && steps.eslint.outcome != 'success' }}
# continue-on-error: true
# uses: ataylorme/eslint-annotate-action@d57a1193d4c59cbfbf3f86c271f42612f9dbd9e9 # 3.0.0
4 changes: 2 additions & 2 deletions .github/workflows/mirror.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Mirror to Codeberg"
uses: cssnr/mirror-repository-action@v1
uses: cssnr/mirror-repository-action@latest
with:
host: https://codeberg.org
create: true
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: echo "$GITHUB_CTX"

- name: "Checkout Pull"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -41,4 +41,10 @@ jobs:

- name: "NPM Outdated Check"
continue-on-error: true
uses: cssnr/npm-outdated-action@master
uses: cssnr/npm-outdated-action@latest

- name: "Actions Up"
continue-on-error: true
uses: cssnr/actions-up-action@latest
with:
exclude: "cssnr/.*,actions/.*"
10 changes: 7 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
steps:
- name: "Update Tags"
id: tags
uses: cssnr/update-version-tags-action@v1
uses: cssnr/update-version-tags-action@latest
with:
tags: "latest"

- name: "Debug Tags"
continue-on-error: true
Expand All @@ -30,13 +32,15 @@ jobs:
with:
tags: ${{ steps.tags.outputs.tags }}
location: tail
type: "actions"

- name: "Package Changelog Action"
continue-on-error: true
uses: cssnr/package-changelog-action@v1
uses: cssnr/package-changelog-action@latest

- name: "Send Failure Notification"
if: ${{ failure() }}
uses: sarisia/actions-status-discord@v1
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}
2 changes: 1 addition & 1 deletion .github/workflows/tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: "Update Tags"
uses: cssnr/update-version-tags-action@v1
uses: cssnr/update-version-tags-action@latest
with:
tag: ${{ inputs.tag }}
token: ${{ secrets.GH_PAT }}
11 changes: 10 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: "Test"

# actions-up-ignore-file

on:
workflow_dispatch:
schedule:
Expand All @@ -26,7 +28,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: "Debug CTX github"
if: ${{ !github.event.act }}
Expand All @@ -35,6 +37,12 @@ jobs:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"

- name: "Debug Environment"
if: ${{ !github.event.act }}
continue-on-error: true
run: |
env

- name: "Write YAML"
id: yaml-action
uses: teunmooij/yaml@v1
Expand Down Expand Up @@ -85,3 +93,4 @@ jobs:
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ node_modules/
.github/disabled/

# Files
.github/PULL_REQUEST_TEMPLATE/
.github/pull_request_template.md
71 changes: 38 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
[![GitHub Tag Minor](https://img.shields.io/github/v/tag/cssnr/portainer-stack-deploy-action?sort=semver&filter=!v*.*.*&logo=git&logoColor=white&labelColor=585858&label=%20)](https://github.com/cssnr/portainer-stack-deploy-action/releases)
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/portainer-stack-deploy-action?logo=git&logoColor=white&labelColor=585858&label=%20)](https://github.com/cssnr/portainer-stack-deploy-action/releases/latest)
[![GitHub Dist Size](https://img.shields.io/github/size/cssnr/portainer-stack-deploy-action/dist%2Findex.js?logo=bookstack&logoColor=white&label=dist%20size)](https://github.com/cssnr/portainer-stack-deploy-action/blob/master/src)
[![Action Run Using](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcssnr%2Fportainer-stack-deploy-action%2Frefs%2Fheads%2Fmaster%2Faction.yml&query=%24.runs.using&logo=githubactions&logoColor=white&label=runs)](https://github.com/cssnr/portainer-stack-deploy-action/blob/master/action.yml)
[![Workflow Release](https://img.shields.io/github/actions/workflow/status/cssnr/portainer-stack-deploy-action/release.yaml?logo=cachet&label=release)](https://github.com/cssnr/portainer-stack-deploy-action/actions/workflows/release.yaml)
[![Workflow Test](https://img.shields.io/github/actions/workflow/status/cssnr/portainer-stack-deploy-action/test.yaml?logo=cachet&label=test)](https://github.com/cssnr/portainer-stack-deploy-action/actions/workflows/test.yaml)
[![Workflow Lint](https://img.shields.io/github/actions/workflow/status/cssnr/portainer-stack-deploy-action/lint.yaml?logo=cachet&label=lint)](https://github.com/cssnr/portainer-stack-deploy-action/actions/workflows/lint.yaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_portainer-stack-deploy-action&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_portainer-stack-deploy-action)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/portainer-stack-deploy-action?logo=github&label=updated)](https://github.com/cssnr/portainer-stack-deploy-action/pulse)
[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/cssnr/portainer-stack-deploy-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F&logo=codeberg&logoColor=white&label=updated)](https://codeberg.org/cssnr/portainer-stack-deploy-action)
[![Docs Last Commit](https://img.shields.io/github/last-commit/cssnr/portainer-stack-deploy-docs?logo=vitepress&logoColor=white&label=docs)](https://portainer-deploy.cssnr.com/)
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/portainer-stack-deploy-action?logo=github)](https://github.com/cssnr/portainer-stack-deploy-action/graphs/contributors)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/portainer-stack-deploy-action?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/portainer-stack-deploy-action?logo=htmx)](https://github.com/cssnr/portainer-stack-deploy-action/blob/master/src)
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/portainer-stack-deploy-action?logo=github)](https://github.com/cssnr/portainer-stack-deploy-action/graphs/contributors)
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/portainer-stack-deploy-action?logo=github)](https://github.com/cssnr/portainer-stack-deploy-action/discussions)
[![GitHub Forks](https://img.shields.io/github/forks/cssnr/portainer-stack-deploy-action?style=flat&logo=github)](https://github.com/cssnr/portainer-stack-deploy-action/forks)
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/portainer-stack-deploy-action?style=flat&logo=github)](https://github.com/cssnr/portainer-stack-deploy-action/stargazers)
Expand All @@ -21,6 +22,9 @@

# Portainer Stack Deploy Action

<a title="Portainer Stack Deploy" href="https://portainer-deploy.cssnr.com/" target="_blank">
<img alt="Portainer Stack Deploy" align="right" width="128" height="auto" src="https://raw.githubusercontent.com/cssnr/portainer-stack-deploy-docs/refs/heads/master/docs/public/images/logo/logo.png"></a>

- [Features](#Features)
- [Inputs](#Inputs)
- [Outputs](#Outputs)
Expand All @@ -30,10 +34,6 @@
- [Support](#Support)
- [Contributing](#Contributing)

<p align="center"><a title="Portainer Stack Deploy" href="https://portainer-deploy.cssnr.com/" target="_blank">
<img alt="Portainer Stack Deploy" width="256" height="auto" src="https://raw.githubusercontent.com/cssnr/portainer-stack-deploy-docs/refs/heads/master/docs/public/images/logo/logo.png" />
</a></p>

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.
Includes most [features](#features) including file or repo deploy, deploy from other repo, custom headers, and much more...
Expand Down Expand Up @@ -79,29 +79,29 @@ 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&nbsp;Value | Description&nbsp;of&nbsp;the&nbsp;Input |
| :------------- | :-------------------- | :------------------------------------------ |
| **name** | _Required_ | Stack Name [⤵️](#name) |
| **url** | _Required_ | Portainer URL [⤵️](#url) |
| **token** | _Required_ | Portainer Token [⤵️](#token) |
| **file** | `docker-compose.yaml` | Compose File [⤵️](#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_data** | - | Env JSON/YAML Data [⤵️](#env_data) |
| **env_json** | **DEPRECATED** | This has changed to [env_data](#env_data) |
| **env_file** | - | Dotenv File Path [⤵️](#env_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/YAML [⤵️](#headers) |
| **summary** | `true` | Add Summary to Job [⤵️](#summary) |
| Input | Default&nbsp;Value | Description&nbsp;of&nbsp;the&nbsp;Input |
| :--------- | :-------------------- | :------------------------------------------ |
| name | _Required_ | Stack Name [⤵️](#name) |
| url | _Required_ | Portainer URL [⤵️](#url) |
| token | _Required_ | Portainer Token [⤵️](#token) |
| file | `docker-compose.yaml` | Compose File [⤵️](#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_data | - | Env JSON/YAML Data [⤵️](#env_data) |
| env_json | **DEPRECATED** | This has changed to [env_data](#env_data) |
| env_file | - | Dotenv File Path [⤵️](#env_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/YAML [⤵️](#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/).
Expand Down Expand Up @@ -676,16 +676,20 @@ and [additional](https://cssnr.com/) open source projects.

[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cssnr)

Additionally, you can support other GitHub Actions I have published:
[![Actions Tools](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions/actions-tools.png)](https://actions-tools.cssnr.com/)

Additionally, you can support other [GitHub Actions](https://actions.cssnr.com/) I have published:

- [Stack Deploy Action](https://github.com/cssnr/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)
- [Actions Up Action](https://github.com/cssnr/actions-up-action?tab=readme-ov-file#readme)
- [Zensical Action](https://github.com/cssnr/zensical-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)
- [TOML Action](https://github.com/cssnr/toml-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)
Expand Down Expand Up @@ -719,10 +723,11 @@ These actions are not published on the Marketplace, but may be useful.

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
- [javascript-action](https://github.com/smashedr/javascript-action?tab=readme-ov-file#readme) - JavaScript
- [typescript-action](https://github.com/smashedr/typescript-action?tab=readme-ov-file#readme) - TypeScript
- [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Dockerfile Python
- [test-action-uv](https://github.com/smashedr/test-action-uv?tab=readme-ov-file#readme) - Dockerfile Python UV
- [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker Image Python

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).

Expand Down
Loading