Skip to content

Commit f38ab9b

Browse files
committed
Update Docs
1 parent 2507ea8 commit f38ab9b

File tree

11 files changed

+68
-34
lines changed

11 files changed

+68
-34
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,22 @@ jobs:
1919
timeout-minutes: 5
2020

2121
steps:
22+
- name: "Checkout"
23+
uses: actions/checkout@v5
24+
25+
- name: "Debug event.json"
26+
continue-on-error: true
27+
run: cat "${GITHUB_EVENT_PATH}"
28+
2229
- name: "Debug CTX github"
23-
if: ${{ !github.event.act }}
2430
continue-on-error: true
2531
env:
2632
GITHUB_CTX: ${{ toJSON(github) }}
2733
run: echo "$GITHUB_CTX"
2834

29-
- name: "Checkout"
30-
uses: actions/checkout@v5
35+
- name: "Debug Environment"
36+
continue-on-error: true
37+
run: env
3138

3239
- name: "Setup Python 3.13"
3340
uses: actions/setup-python@v6

.github/workflows/lint.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
workflow_dispatch:
55
push:
66
branches: [master]
7+
paths-ignore:
8+
- ".gitignore"
9+
- ".prettierignore"
10+
- "build.ps1"
11+
- "MANIFEST.in"
12+
- "pyproject.toml"
713
pull_request:
814

915
concurrency:
@@ -24,19 +30,16 @@ jobs:
2430
uses: actions/checkout@v5
2531

2632
- name: "Debug event.json"
27-
if: ${{ !github.event.act }}
2833
continue-on-error: true
2934
run: cat "${GITHUB_EVENT_PATH}"
3035

3136
- name: "Debug CTX github"
32-
if: ${{ !github.event.act }}
3337
continue-on-error: true
3438
env:
3539
GITHUB_CTX: ${{ toJSON(github) }}
3640
run: echo "$GITHUB_CTX"
3741

3842
- name: "Debug Environment"
39-
if: ${{ !github.event.act }}
4043
continue-on-error: true
4144
run: env
4245

.github/workflows/release.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,27 @@ jobs:
3131
url: ${{ env.url }}
3232

3333
steps:
34-
- name: "Debug"
35-
run: |
36-
echo "github.ref_name: ${{ github.ref_name }}"
37-
echo "name: ${{ github.event.release.prerelease && 'test' || 'pypi' }}"
38-
echo "env.url: ${{ env.url }}"
39-
echo "env.repository-url: ${{ env.repository-url }}"
34+
- name: "Debug event.json"
35+
continue-on-error: true
36+
run: cat "${GITHUB_EVENT_PATH}"
4037

4138
- name: "Debug CTX github"
42-
if: ${{ !github.event.act }}
4339
continue-on-error: true
4440
env:
4541
GITHUB_CTX: ${{ toJSON(github) }}
4642
run: echo "$GITHUB_CTX"
4743

44+
#- name: "Debug Environment"
45+
# continue-on-error: true
46+
# run: env
47+
48+
- name: "Debug"
49+
run: |
50+
echo "github.ref_name: ${{ github.ref_name }}"
51+
echo "name: ${{ github.event.release.prerelease && 'test' || 'pypi' }}"
52+
echo "env.url: ${{ env.url }}"
53+
echo "env.repository-url: ${{ env.repository-url }}"
54+
4855
- name: "Download Artifact"
4956
uses: actions/download-artifact@v6
5057
with:

.github/workflows/test.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ on:
1515
jobs:
1616
build:
1717
name: "Build"
18+
if: ${{ !contains(github.event.head_commit.message, '#notest') }}
1819
uses: ./.github/workflows/build.yaml
1920
with:
2021
name: test
21-
#permissions:
22-
# contents: write
2322

2423
test:
2524
runs-on: ubuntu-latest
2625
timeout-minutes: 5
2726
needs: [build]
28-
if: ${{ !contains(github.event.head_commit.message, '#notest') }}
2927
strategy:
3028
fail-fast: false
3129
matrix:
@@ -50,10 +48,10 @@ jobs:
5048
GITHUB_CTX: ${{ toJSON(github) }}
5149
run: echo "$GITHUB_CTX"
5250

53-
#- name: "Debug Environment"
54-
# if: ${{ !github.event.act }}
55-
# continue-on-error: true
56-
# run: env
51+
- name: "Debug Environment"
52+
if: ${{ !github.event.act }}
53+
continue-on-error: true
54+
run: env
5755

5856
- name: "Download Artifact"
5957
uses: actions/download-artifact@v6

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Generic
12
.idea/
23
*.iml
34
.vscode/
@@ -11,6 +12,8 @@ dist/
1112
*.pyc
1213
.coverage
1314
coverage.xml
15+
# Zensical
1416
site/
1517
.cache/
18+
# App
1619
output.txt

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/releases)
33
[![TOML Python Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcssnr%2Factions-tools%2Frefs%2Fheads%2Fmaster%2Fpyproject.toml&query=%24.project.requires-python&logo=python&logoColor=white&label=python)](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
44
[![PyPI Downloads](https://img.shields.io/pypi/dm/actions-tools?logo=pypi&logoColor=white)](https://pypistats.org/packages/actions-tools)
5+
[![Pepy Total Downloads](https://img.shields.io/pepy/dt/actions-tools?logo=pypi&logoColor=white&label=total)](https://clickpy.clickhouse.com/dashboard/actions-tools)
56
[![Codecov](https://codecov.io/gh/cssnr/actions-tools/graph/badge.svg?token=A8NDHZ393X)](https://codecov.io/gh/cssnr/actions-tools)
67
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_actions-tools&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_actions-tools)
78
[![Workflow Test](https://img.shields.io/github/actions/workflow/status/cssnr/actions-tools/test.yaml?logo=cachet&label=test)](https://github.com/cssnr/actions-tools/actions/workflows/test.yaml)
@@ -13,7 +14,7 @@
1314
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/actions-tools?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/cssnr/actions-tools)
1415
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/actions-tools?logo=htmx&logoColor=white)](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
1516
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/graphs/contributors)
16-
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/cloudflare-purge-cache-action?logo=github)](https://github.com/cssnr/cloudflare-purge-cache-action/discussions)
17+
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/discussions)
1718
[![GitHub Forks](https://img.shields.io/github/forks/cssnr/actions-tools?style=flat&logo=github)](https://github.com/cssnr/actions-tools/forks)
1819
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/actions-tools?style=flat&logo=github)](https://github.com/cssnr/actions-tools/stargazers)
1920
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&label=org%20stars)](https://cssnr.github.io/)
@@ -151,7 +152,7 @@ core.is_debug()
151152
# https://pygithub.readthedocs.io/en/stable/
152153
token = core.get_input("token", True)
153154
g = core.get_github(token)
154-
repo = g.get_repo(f"{context.repository}")
155+
repo = g.get_repo(context.repository)
155156
core.info(f"repo.name: {repo.name}")
156157

157158
# OIDC Token

docs/actions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ icon: simple/githubactions
44

55
# :simple-githubactions: Actions
66

7+
[![Actions Tools](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions-tools/logo128.png){ align=right width=96 }](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
8+
79
I have also developed quite a few [GitHub Actions](https://actions.cssnr.com/actions).
810

911
- https://actions.cssnr.com/

docs/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ icon: lucide/rocket
44

55
# :lucide-rocket: Get Started
66

7-
[![Image title](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions-tools/logo128.png){ align=right }](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
7+
[![Actions Tools](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions-tools/logo128.png){ align=right width=96 }](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
88

99
[![PyPI Version](https://img.shields.io/pypi/v/actions-tools?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/actions-tools/)
10-
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/releases)
1110
[![TOML Python Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcssnr%2Factions-tools%2Frefs%2Fheads%2Fmaster%2Fpyproject.toml&query=%24.project.requires-python&logo=python&logoColor=white&label=python)](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
1211
[![PyPI Downloads](https://img.shields.io/pypi/dm/actions-tools?logo=pypi&logoColor=white)](https://pypistats.org/packages/actions-tools)
12+
[![Pepy Total Downloads](https://img.shields.io/pepy/dt/actions-tools?logo=pypi&logoColor=white&label=total)](https://clickpy.clickhouse.com/dashboard/actions-tools)
13+
[![Workflow Test](https://img.shields.io/github/actions/workflow/status/cssnr/actions-tools/test.yaml?logo=cachet&label=test)](https://github.com/cssnr/actions-tools/actions/workflows/test.yaml)
1314
[![Codecov](https://codecov.io/gh/cssnr/actions-tools/graph/badge.svg?token=A8NDHZ393X)](https://codecov.io/gh/cssnr/actions-tools)
1415
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_actions-tools&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_actions-tools)
15-
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/actions-tools?logo=htmx&logoColor=white)](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
1616
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/actions-tools?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/actions-tools/graphs/commit-activity)
17-
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/actions-tools?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/cssnr/actions-tools)
17+
[![GitHub Issues](https://img.shields.io/github/issues/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/issues)
18+
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/discussions)
1819
[![GitHub Forks](https://img.shields.io/github/forks/cssnr/actions-tools?style=flat&logo=github)](https://github.com/cssnr/actions-tools/forks)
1920
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/actions-tools?style=flat&logo=github&logoColor=white)](https://github.com/cssnr/actions-tools/stargazers)
2021
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&label=org%20stars)](https://cssnr.github.io/)
@@ -131,7 +132,7 @@ from actions import core, context
131132

132133
token = core.get_input("token", True)
133134
g = core.get_github(token) # (1)!
134-
repo = g.get_repo(f"{context.repository}")
135+
repo = g.get_repo(context.repository)
135136
core.info(f"repo.name: {repo.name}")
136137
core.set_output("name", repo.name)
137138
core.summary.add_raw("🚀 We Did It!")

docs/support.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ icon: lucide/message-circle-question-mark
44

55
# :lucide-message-circle-question-mark: Support
66

7-
If you run into any [issues](https://github.com/cssnr/actions-tools/issues),
7+
[![Actions Tools](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions-tools/logo128.png){ align=right width=96 }](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
8+
9+
If you run into any [issues](https://github.com/cssnr/actions-tools/issues)
810
want to see more [features](https://github.com/cssnr/actions-tools/discussions/categories/feature-requests)
911
or just have a [question](https://github.com/cssnr/actions-tools/discussions/categories/q-a)
1012
please let us know.

docs/usage.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ icon: lucide/notebook-pen
44

55
# :lucide-notebook-pen: Usage
66

7+
[![Actions Tools](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions-tools/logo128.png){ align=right width=96 }](https://github.com/cssnr/actions-tools?tab=readme-ov-file#readme)
8+
79
After [installing](index.md) import the module and start using the methods...
810

911
## From actions/core
1012

13+
These methods are similar to the JavaScript [actions/core](https://github.com/actions/toolkit/tree/main/packages/core#usage) Toolkit.
14+
1115
Full `core` reference: [/src/actions/core.py](https://github.com/cssnr/actions-tools/blob/master/src/actions/core.py)
1216

1317
### Inputs
@@ -40,7 +44,7 @@ my_data = core.get_data("data") # -> Any - from json or yaml
4044

4145
### Context
4246

43-
This is a custom `object`: [/src/actions/context.py](https://github.com/cssnr/actions-tools/blob/master/src/actions/context.py)
47+
Full `context` reference: [/src/actions/context.py](https://github.com/cssnr/actions-tools/blob/master/src/actions/context.py)
4448

4549
```python
4650
from actions import core, context
@@ -227,7 +231,7 @@ token = core.get_input("token", True)
227231

228232
g = core.get_github(token) # (1)!
229233

230-
repo = g.get_repo(f"{context.repository}")
234+
repo = g.get_repo(context.repository)
231235
core.info(f"repo.name: {repo.name}")
232236
```
233237

@@ -251,6 +255,8 @@ Reference: https://docs.github.com/en/actions/reference/security/oidc
251255

252256
## New In actions-tools
253257

258+
These methods are new in actions-tools.
259+
254260
```python
255261
from actions import core, context
256262
@@ -269,8 +275,12 @@ core.info("Indented") # only works with core.info
269275
core.end_indent()
270276
```
271277

278+
Please [let us know](https://github.com/cssnr/actions-tools/discussions/categories/feature-requests) what **features** you want.
279+
272280
## Example Actions
273281

282+
Example and Template Actions using [actions-tools](https://github.com/cssnr/actions-tools?tab=contributing-ov-file#readme).
283+
274284
- Create Files Action: [cssnr/create-files-action/src/main.py](https://github.com/cssnr/create-files-action/blob/master/src/main.py)
275285
- Python Action Template: [smashedr/test-action-py/src/main.py](https://github.com/smashedr/test-action-py/blob/master/src/main.py)
276286
- Python UV Action Template: [smashedr/test-action-uv/src/main.py](https://github.com/smashedr/test-action-uv/blob/master/src/main.py)

0 commit comments

Comments
 (0)