Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhimmel/dump-actions-context
Expose GitHub actions context based on the workflow event type
https://github.com/dhimmel/dump-actions-context
actions context github github-actions gron json workflow
Last synced: about 1 month ago
JSON representation
Expose GitHub actions context based on the workflow event type
- Host: GitHub
- URL: https://github.com/dhimmel/dump-actions-context
- Owner: dhimmel
- License: mit
- Created: 2022-08-16T16:40:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T17:56:21.000Z (2 months ago)
- Last Synced: 2024-09-06T01:16:29.316Z (2 months ago)
- Topics: actions, context, github, github-actions, gron, json, workflow
- Homepage:
- Size: 71.3 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Materialized GitHub Actions contexts by event type
Runs GitHub actions and dumps contexts to see what variables are available.
This can be helpful when writing GitHub actions workflows that use context variables.
Since the available context variables depend on the event type,
this repository aims to capture as many event types as possible.
Contributions are welcome to add additional event types.## Contexts
Contexts are combined into a single JSON file and written back to the repository in the [`contexts`](contexts) directory.
The JSON files are also exported in [gron](https://github.com/tomnomnom/gron) format for easy identification of the absolute path to a value.You can also search for workflow runs by event type:
- [push](https://github.com/dhimmel/dump-actions-context/actions?query=event:push)
- [pull_request](https://github.com/dhimmel/dump-actions-context/actions?query=event:pull_request)
- [workflow_dispatch](https://github.com/dhimmel/dump-actions-context/actions?query=event:workflow_dispatch)
- [schedule](https://github.com/dhimmel/dump-actions-context/actions?query=event:schedule)
- [release](https://github.com/dhimmel/dump-actions-context/actions?query=event:release)One benefit of the workflow logs is that gron output has syntax highlighting.
However, workflow logs are only retained for 90 days,
so for many event types, only the materialized files committed back to the repository will be available.## References
- https://docs.github.com/en/actions/learn-github-actions/contexts#example-printing-context-information-to-the-log
- https://github.com/community/community/discussions/12269
- https://twitter.com/dhimmel/status/1559592874282557442