Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jj/perl-github-actions
GitHub::Actions, a Perl helper for them
https://github.com/jj/perl-github-actions
actions github-actions hacktoberfest hacktoberfest2021 hacktoberfest2022
Last synced: 7 days ago
JSON representation
GitHub::Actions, a Perl helper for them
- Host: GitHub
- URL: https://github.com/jj/perl-github-actions
- Owner: JJ
- License: other
- Created: 2021-01-14T06:55:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T16:37:24.000Z (2 months ago)
- Last Synced: 2024-11-02T14:51:44.625Z (14 days ago)
- Topics: actions, github-actions, hacktoberfest, hacktoberfest2021, hacktoberfest2022
- Language: Perl
- Homepage:
- Size: 83 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# GitHub::Actions [![Checks the github action using itself](https://github.com/JJ/perl-GitHub-Actions/actions/workflows/self-test.yml/badge.svg)](https://github.com/JJ/perl-GitHub-Actions/actions/workflows/self-test.yml)
Use GitHub Actions workflow commands directly from Perl, generally using the
system Perl included in the runners.## INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install## DEPENDENCIES
None (intentionally).
## HOW TO
After installation, use `perldoc GitHub::Actions` for the commands available
(generally a `snake_cased` version of the corresponding GitHub Action commands).If you want to use this inside a GitHub action together with other stuff, you
will have to use [`fatpack`](https://metacpan.org/dist/App-FatPacker) to create
a single command. For instance,```perl
#!/usr/bin/env perluse strict;
use warnings;
use GitHub::Actions;warning("Installed")
```saved to `src/warning.pl` will have to be fatpacked via:
```
fatpack pack src/warning.pl > dist/warning
chmod +x dist/warning
```and then, within a step:
```yaml
- name: Test set_failed
run: dist/warning
```> Remember that Perl is installed, by default, in Linux GitHub runners. Also
> MacOS, probably.This distribution has been created for use with the *system* Perl, so generally
you will have to write `sudo cpan GitHub::Actions` in a prior step. Once it's
been installed, this will work:```yaml
- name: Test set_failed
shell: perl {0}
run: |
use GitHub::Actions;
system(".github/workflows/set_failed.pl");
set_output( "Exit code is $?" );
```## COPYRIGHT AND LICENCE
Copyright (C) 2021, 2022 JJ Merelo
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.