actions-tools 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,296 @@
1
+ Metadata-Version: 2.4
2
+ Name: actions-tools
3
+ Version: 0.2.1
4
+ Summary: A Typed Python GitHub Actions Tookit similar to actions/toolkit.
5
+ Author: Shane
6
+ License: GPL-3.0
7
+ Project-URL: Homepage, https://cssnr.com/
8
+ Project-URL: Documentation, https://actions-tools.cssnr.com/
9
+ Project-URL: Source, https://github.com/cssnr/actions-tools
10
+ Project-URL: Issues, https://github.com/cssnr/actions-tools/issues
11
+ Project-URL: Funding, https://ko-fi.com/cssnr
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
22
+ Classifier: Natural Language :: English
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: PyYAML
27
+ Provides-Extra: github
28
+ Requires-Dist: PyGithub<3,>=2; extra == "github"
29
+ Dynamic: license-file
30
+
31
+ [![PyPI Version](https://img.shields.io/pypi/v/actions-tools?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/actions-tools/)
32
+ [![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)
34
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/actions-tools?logo=pypi&logoColor=white)](https://pepy.tech/projects/actions-tools)
35
+ [![Codecov](https://codecov.io/gh/cssnr/actions-tools/graph/badge.svg?token=A8NDHZ393X)](https://codecov.io/gh/cssnr/actions-tools)
36
+ [![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)
37
+ [![Release Workflow](https://img.shields.io/github/actions/workflow/status/cssnr/actions-tools/release.yaml?logo=github&logoColor=white&label=release)](https://github.com/cssnr/actions-tools/actions/workflows/release.yaml)
38
+ [![Lint Workflow](https://img.shields.io/github/actions/workflow/status/cssnr/actions-tools/lint.yaml?logo=github&logoColor=white&label=lint)](https://github.com/cssnr/actions-tools/actions/workflows/lint.yaml)
39
+ [![Test Workflow](https://img.shields.io/github/actions/workflow/status/cssnr/actions-tools/test.yaml?logo=github&logoColor=white&label=test)](https://github.com/cssnr/actions-tools/actions/workflows/test.yaml)
40
+ [![GitHub Deployments](https://img.shields.io/github/deployments/cssnr/actions-tools/pypi?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/actions-tools/)
41
+ [![GitHub Deployments](https://img.shields.io/github/deployments/cssnr/actions-tools/docs?logo=materialformkdocs&logoColor=white&label=docs)](https://actions-tools.cssnr.com/)
42
+ [![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)
43
+ [![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)
44
+ [![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/actions-tools?logo=github)](https://github.com/cssnr/actions-tools/graphs/contributors)
45
+ [![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)
46
+ [![GitHub Forks](https://img.shields.io/github/forks/cssnr/actions-tools?style=flat&logo=github)](https://github.com/cssnr/actions-tools/forks)
47
+ [![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)
48
+ [![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&label=org%20stars)](https://cssnr.github.io/)
49
+ [![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
50
+ [![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi&label=support)](https://ko-fi.com/cssnr)
51
+
52
+ # Actions Tools
53
+
54
+ - [Install](#Install)
55
+ - [Usage](#Usage)
56
+ - [Support](#Support)
57
+ - [Contributing](#Contributing)
58
+
59
+ <p align="center"><a title="Actions Tools Docs" href="https://actions-tools.cssnr.com/" target="_blank">
60
+ <img alt="Actions Tools Docs" width="256" height="auto" src="https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions-tools/logo256.png" />
61
+ </a></p>
62
+
63
+ A Typed Python GitHub Actions Tookit similar to [actions/toolkit](https://github.com/actions/toolkit).
64
+
65
+ - http://actions-tools.cssnr.com
66
+
67
+ > [!NOTE]
68
+ > This project is in active development.
69
+ > Please [let us know](https://github.com/cssnr/actions-tools/discussions/categories/feature-requests)
70
+ > what features you want to see.
71
+ > The [Documentation Site](https://actions-tools.cssnr.com/) is also a work in progress...
72
+
73
+ ## Install
74
+
75
+ From PyPI: https://pypi.org/p/actions-tools
76
+
77
+ ```shell
78
+ python -m pip install actions-tools
79
+ ```
80
+
81
+ With [PyGithub](https://github.com/PyGithub/PyGithub) (for GitHub API access).
82
+
83
+ ```shell
84
+ python -m pip install actions-tools[github]
85
+ ```
86
+
87
+ Install from source.
88
+
89
+ ```shell
90
+ git clone https://github.com/cssnr/actions-tools
91
+ python -m pip install actions-tools
92
+ ```
93
+
94
+ Uninstall.
95
+
96
+ ```shell
97
+ python -m pip uninstall actions-tools
98
+ ```
99
+
100
+ ## Usage
101
+
102
+ A [usage guide](https://actions-tools.cssnr.com/usage/) is available on the [documentation site](https://actions-tools.cssnr.com/).
103
+
104
+ Functionality from @actions/toolkit
105
+
106
+ ```python
107
+ from actions import core, context
108
+
109
+ # Input
110
+ my_str = core.get_input("string") # -> str
111
+ my_req = core.get_input("string", True) # required
112
+ my_bool = core.get_bool("boolean") # -> bool
113
+ my_list = core.get_list("list") # -> list
114
+ my_dict = core.get_dict("dict") # -> dict - from json or yaml
115
+ my_data = core.get_dict("data") # -> Any - from json or yaml
116
+
117
+ # Context
118
+ # https://docs.github.com/en/actions/reference/workflows-and-actions/variables
119
+ core.info(f"event_name: {context.event_name}")
120
+ core.info(f"ref_name: {context.ref_name}")
121
+ core.info(f"runner_temp: {context.runner_temp}")
122
+
123
+ # Event
124
+ # https://docs.github.com/en/webhooks/webhook-events-and-payloads
125
+ event = core.get_event() # -> dict
126
+ core.info(str(event))
127
+ repository = event.get("repository")
128
+
129
+ # Logging
130
+ core.info("info") # alias for print
131
+ core.debug("debug")
132
+
133
+ # Annotations
134
+ # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-a-notice-message
135
+ core.notice("notice")
136
+ core.warn("warn")
137
+ core.error("error", title="Title", file="File", col=1, endColumn=2, line=3, endLine=4)
138
+
139
+ # Blocks
140
+ core.start_group("Title")
141
+ core.info("This is folded.")
142
+ core.end_group()
143
+
144
+ with core.group("Title") as p:
145
+ p("This is folded.")
146
+ core.info("Also folded.")
147
+
148
+ # Environment
149
+ core.set_env("NAME", "value")
150
+
151
+ # State
152
+ name = core.set_state("name", "value")
153
+ value = core.get_state("name")
154
+
155
+ # System Path
156
+ core.add_path("/dev/null")
157
+
158
+ # Set Secret
159
+ core.mask("super-secret-string")
160
+
161
+ # Outputs
162
+ core.set_output("name", "cssnr")
163
+
164
+ # Commands
165
+ core.stop_commands()
166
+ core.info("::error::log output with commands")
167
+ core.start_commands()
168
+
169
+ # Summary
170
+ core.summary("## Test Action")
171
+
172
+ # Abort
173
+ core.set_failed("Mayday!")
174
+
175
+ # Runner Debug
176
+ core.is_debug()
177
+
178
+ # PyGithub (Octokit)
179
+ # https://pygithub.readthedocs.io/en/stable/
180
+ token = core.get_input("token", True)
181
+ g = core.get_github(token)
182
+ repo = g.get_repo(f"{context.repository}")
183
+ core.info(f"repo.name: {repo.name}")
184
+
185
+ # OIDC Token
186
+ # https://docs.github.com/en/actions/reference/security/oidc
187
+ id_token = core.get_id_token()
188
+ ```
189
+
190
+ - Full `core` reference: [../src/actions/core.py](https://github.com/cssnr/actions-tools/blob/master/src/actions/core.py)
191
+ - Full `context` reference: [../src/actions/context.py](https://github.com/cssnr/actions-tools/blob/master/src/actions/context.py)
192
+
193
+ Functionality new in actions-tools
194
+
195
+ ```python
196
+ from actions import core, context
197
+
198
+ # Context
199
+ core.info(f"repository_name: {context.repository_name}")
200
+
201
+ # Commands
202
+ core.command("warning", "Warned!") # core.warn()
203
+
204
+ # Action Version
205
+ version = core.get_version() # from GITHUB_WORKFLOW_REF
206
+
207
+ # Random
208
+ rand = core.get_random(32)
209
+
210
+ # Indent
211
+ core.start_indent(4)
212
+ core.info("Indented") # only works with core.info
213
+ core.end_indent()
214
+ ```
215
+
216
+ - Example py action: [smashedr/test-action-py](https://github.com/smashedr/test-action-py/blob/master/src/main.py)
217
+ - Example uv action: [smashedr/test-action-uv](https://github.com/smashedr/test-action-uv/blob/master/src/main.py)
218
+
219
+ # Support
220
+
221
+ For general help or to request a feature, see:
222
+
223
+ - Q&A Discussion: https://github.com/cssnr/actions-tools/discussions/categories/q-a
224
+ - Request a Feature: https://github.com/cssnr/actions-tools/discussions/categories/feature-requests
225
+ - Chat with us on Discord: https://discord.gg/wXy6m2X8wY
226
+
227
+ If you are experiencing an issue/bug or getting unexpected results, you can:
228
+
229
+ - Report an Issue: https://github.com/cssnr/actions-tools/issues
230
+ - Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=actions-tools)
231
+ - Chat with us on Discord: https://discord.gg/wXy6m2X8wY
232
+
233
+ # Contributing
234
+
235
+ If you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).
236
+
237
+ Please consider making a donation to support the development of this project
238
+ and [additional](https://cssnr.com/) open source projects.
239
+
240
+ [![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cssnr)
241
+
242
+ Additionally, you can support other [GitHub Actions](https://actions.cssnr.com/) I have published:
243
+
244
+ - [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
245
+ - [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
246
+ - [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)
247
+ - [Actions Up Action](https://github.com/cssnr/actions-up-action?tab=readme-ov-file#readme)
248
+ - [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
249
+ - [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
250
+ - [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
251
+ - [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
252
+ - [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
253
+ - [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)
254
+ - [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
255
+ - [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
256
+ - [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
257
+ - [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)
258
+ - [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)
259
+ - [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)
260
+ - [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)
261
+ - [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)
262
+ - [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)
263
+ - [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)
264
+ - [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)
265
+
266
+ <details><summary>❔ Unpublished Actions</summary>
267
+
268
+ These actions are not published on the Marketplace, but may be useful.
269
+
270
+ - [cssnr/create-files-action](https://github.com/cssnr/create-files-action?tab=readme-ov-file#readme) - Create various files from templates.
271
+ - [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.
272
+ - [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.
273
+ - [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.
274
+ - [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.
275
+ - [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.
276
+
277
+ ---
278
+
279
+ </details>
280
+
281
+ <details><summary>📝 Template Actions</summary>
282
+
283
+ These are basic action templates that I use for creating new actions.
284
+
285
+ - [js-test-action](https://github.com/smashedr/js-test-action?tab=readme-ov-file#readme) - JavaScript
286
+ - [ts-test-action](https://github.com/smashedr/ts-test-action?tab=readme-ov-file#readme) - TypeScript
287
+ - [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Python (Dockerfile)
288
+ - [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker (Image)
289
+
290
+ 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).
291
+
292
+ ---
293
+
294
+ </details>
295
+
296
+ For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)
@@ -0,0 +1,9 @@
1
+ actions/__init__.py,sha256=RKS7P331MqH0IazQa_K0GZ-lNr3UugtpkxVPBPd7ZGQ,261
2
+ actions/context.py,sha256=0cnb2NuvtUccraGTeK0x7d5cKxWdtZObSeOcwuXYWK0,2528
3
+ actions/core.py,sha256=RCRfCUoqpTXBxQ5dkmIloiFi7dRiKJdOqr6Qln_jQYM,9908
4
+ actions/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ actions_tools-0.2.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
6
+ actions_tools-0.2.1.dist-info/METADATA,sha256=puMxSLfmJ6n_cx_CFMDGC3vReKFvwl1Ut7L_RqQ1KQo,14139
7
+ actions_tools-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ actions_tools-0.2.1.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
9
+ actions_tools-0.2.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+