Skip to content

Commit 60eb115

Browse files
committed
Update Workflows
1 parent b82bf8e commit 60eb115

File tree

6 files changed

+85
-49
lines changed

6 files changed

+85
-49
lines changed

.github/workflows/lint.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Lint"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
lint:
11+
name: "Lint"
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: "Checkout"
17+
uses: actions/checkout@v4
18+
19+
#- name: "Debug event.json"
20+
# run: |
21+
# cat "${GITHUB_EVENT_PATH}"
22+
23+
- name: "ShellCheck"
24+
if: ${{ always() }}
25+
uses: ludeeus/action-shellcheck@master
26+
with:
27+
scandir: src
28+
29+
- name: "Prettier"
30+
if: ${{ always() }}
31+
run: |
32+
npm install prettier
33+
npx prettier --check .

.github/workflows/mirror.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: "Mirror"
22

33
on:
44
workflow_dispatch:
5-
release:
6-
types: ["published"]
75
push:
86
branches: ["**"]
97
tags: ["**"]
@@ -21,7 +19,7 @@ jobs:
2119
fetch-depth: 0
2220

2321
- name: "Mirror to Codeberg"
24-
uses: cssnr/mirror-repository-action@master
22+
uses: cssnr/mirror-repository-action@v1
2523
with:
2624
host: https://codeberg.org
2725
create: true

.github/workflows/tags.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
name: "Tags"
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 5
12+
permissions:
13+
contents: write
1214

1315
steps:
1416
- name: "Update Tags"
1517
uses: cssnr/update-version-tags-action@v1
16-
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: "Test"
22

33
on:
44
workflow_dispatch:
5-
pull_request:
65
push:
7-
branches: [master]
6+
paths:
7+
- "src/**"
8+
- ".github/workflows/test.yaml"
9+
- "Dockerfile"
10+
- "action.yaml"
811

912
env:
1013
PRIVATE_IMAGE: "smashedr/alpine-private:latest" # amd64/arm64
@@ -14,11 +17,16 @@ jobs:
1417
name: "Test"
1518
runs-on: ubuntu-latest
1619
timeout-minutes: 5
20+
if: ${{ !contains(github.event.head_commit.message, '#notest') }}
1721

1822
steps:
1923
- name: "Checkout"
2024
uses: actions/checkout@v4
2125

26+
#- name: "Debug event.json"
27+
# run: |
28+
# cat "${GITHUB_EVENT_PATH}"
29+
2230
- name: "Write YAML Basic"
2331
uses: teunmooij/yaml@v1
2432
with:
@@ -57,17 +65,3 @@ jobs:
5765
#registry_host: "ghcr.io"
5866
registry_user: ${{ vars.DOCKER_HUB_USER }}
5967
registry_pass: ${{ secrets.DOCKER_HUB_PASS }}
60-
61-
lint:
62-
name: "Lint"
63-
runs-on: ubuntu-latest
64-
timeout-minutes: 5
65-
66-
steps:
67-
- name: "Checkout"
68-
uses: actions/checkout@v4
69-
70-
- name: "ShellCheck"
71-
uses: ludeeus/action-shellcheck@master
72-
with:
73-
scandir: src

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# IDE
2+
.idea/
3+
.vscode/
4+
5+
# Tools
6+
.ruff_cache/
7+
.mypy_cache/
8+
.pytest_cache/

README.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,44 @@
11
[![Tags](https://img.shields.io/github/actions/workflow/status/cssnr/stack-deploy-action/tags.yaml?logo=github&logoColor=white&label=tags)](https://github.com/cssnr/stack-deploy-action/actions/workflows/tags.yaml)
22
[![Test](https://img.shields.io/github/actions/workflow/status/cssnr/stack-deploy-action/test.yaml?logo=github&logoColor=white&label=test)](https://github.com/cssnr/stack-deploy-action/actions/workflows/test.yaml)
3+
[![Lint](https://img.shields.io/github/actions/workflow/status/cssnr/stack-deploy-action/lint.yaml?logo=github&logoColor=white&label=lint)](https://github.com/cssnr/stack-deploy-action/actions/workflows/lint.yaml)
34
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/stack-deploy-action?logo=github)](https://github.com/cssnr/stack-deploy-action/releases/latest)
45
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/parse-issue-form-action?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/parse-issue-form-action/graphs/commit-activity)
56
[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/cssnr/parse-issue-form-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F&logo=codeberg&logoColor=white&label=updated)](https://codeberg.org/cssnr/parse-issue-form-action)
67
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/stack-deploy-action?logo=htmx&logoColor=white)](https://github.com/cssnr/stack-deploy-action)
8+
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/stack-deploy-action?style=flat&logo=github&logoColor=white)](https://github.com/cssnr/stack-deploy-action/stargazers)
79
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&logoColor=white)](https://cssnr.github.io/)
810
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
911

1012
# Docker Stack Deploy Action
1113

14+
- [Inputs](#Inputs)
15+
- [Examples](#Examples)
16+
- [Support](#Support)
17+
- [Contributing](#Contributing)
18+
1219
This action deploys a docker stack from a compose file to a remote docker host using SSH Password or Key File Authentication.
1320
You can also optionally authenticate against a private registry using a username and password.
1421

1522
For more details see [action.yaml](action.yaml) and [src/main.sh](src/main.sh).
1623

1724
_Portainer Users_: You can deploy directly to Portainer with: [cssnr/portainer-stack-deploy-action](https://github.com/cssnr/portainer-stack-deploy-action)
1825

19-
- [Inputs](#Inputs)
20-
- [Examples](#Examples)
21-
- [Support](#Support)
22-
- [Contributing](#Contributing)
23-
2426
## Inputs
2527

26-
| input | required | default | description |
27-
| ------------- | ---------------- | --------------------- | --------------------------------- |
28-
| host | **Yes** | - | Remote Docker hostname |
29-
| port | No | `22` | Remote Docker port |
30-
| user | **Yes** | - | Remote Docker username |
28+
| input | required | default | description |
29+
| ------------- | :--------------: | --------------------- | --------------------------------- |
30+
| host | **Yes** | - | Remote Docker hostname |
31+
| port | - | `22` | Remote Docker port |
32+
| user | **Yes** | - | Remote Docker username |
3133
| pass | Not w/ `ssh_key` | - | Remote Docker password \* |
32-
| ssh_key | Not w/ `pass` | - | Remote SSH Key file \* |
33-
| file | No | `docker-compose.yaml` | Docker Compose file |
34-
| name | **Yes** | - | Docker Stack name |
35-
| env_file | No | - | Docker Environment file |
36-
| registry_auth | No | - | Enable Registry Authentication \* |
37-
| registry_host | No | - | Registry Authentication Host \* |
38-
| registry_user | No | - | Registry Authentication User \* |
39-
| registry_pass | No | - | Registry Authentication Pass \* |
34+
| ssh_key | Not w/ `pass` | - | Remote SSH Key file \* |
35+
| file | - | `docker-compose.yaml` | Docker Compose file |
36+
| name | **Yes** | - | Docker Stack name |
37+
| env_file | - | - | Docker Environment file |
38+
| registry_auth | - | - | Enable Registry Authentication \* |
39+
| registry_host | - | - | Registry Authentication Host \* |
40+
| registry_user | - | - | Registry Authentication User \* |
41+
| registry_pass | - | - | Registry Authentication Pass \* |
4042

4143
**pass/ssh_key** - You must provide either a `pass` or `ssh_key`
4244

@@ -181,22 +183,23 @@ If you are experiencing an issue/bug or getting unexpected results you can:
181183

182184
- Report an Issue: https://github.com/cssnr/stack-deploy-action/issues
183185
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
184-
- Provide General
185-
Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=Stack%20Deploy)
186+
- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=Stack%20Deploy)
186187

187188
# Contributing
188189

189190
Currently, the best way to contribute to this project is to star this project on GitHub.
190191

191192
Additionally, you can support other GitHub Actions I have published:
192193

193-
- [VirusTotal Action](https://github.com/cssnr/virustotal-action)
194-
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action)
195-
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action)
196-
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action)
197-
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action)
198-
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action)
199-
- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action)
200-
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action)
194+
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
195+
- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
196+
- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
197+
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
198+
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
199+
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
200+
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
201+
- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
202+
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
203+
- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
201204

202205
For a full list of current projects to support visit: [https://cssnr.github.io/](https://cssnr.github.io/)

0 commit comments

Comments
 (0)