https://github.com/julia-actions/githubactions.jl
Utilities for working within GitHub Actions
https://github.com/julia-actions/githubactions.jl
Last synced: 4 months ago
JSON representation
Utilities for working within GitHub Actions
- Host: GitHub
- URL: https://github.com/julia-actions/githubactions.jl
- Owner: julia-actions
- License: mit
- Created: 2020-06-17T19:47:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-10T13:56:27.000Z (9 months ago)
- Last Synced: 2025-01-20T18:39:39.888Z (5 months ago)
- Language: Julia
- Homepage:
- Size: 512 KB
- Stars: 16
- Watchers: 5
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHubActions
[](https://julia-actions.github.io/GitHubActions.jl)
[](https://github.com/julia-actions/GitHubActions.jl/actions)Utilities for working within GitHub Actions, modelled after [`actions/core`](https://github.com/actions/toolkit/tree/main/packages/core).
Perhaps the most common use case is to set the global logger to one compatible with GitHub Actions' log format:
### In A Package
For package code, set the global logger in `__init__`.
```jl
using Logging: global_logger
using GitHubActions: GitHubActionsLogger
function __init__()
get(ENV, "GITHUB_ACTIONS", "false") == "true" && global_logger(GitHubActionsLogger())
end
```### In Tests
In tests, set the global logger at the top level.
```jl
using Logging: global_logger
using GitHubActions: GitHubActionsLogger
get(ENV, "GITHUB_ACTIONS", "false") == "true" && global_logger(GitHubActionsLogger())
```For information on the other provided functions, see the documentation.