Badge::Depot::Plugin::Githubactions - Github Actions plugin for Badge::Depot
Version 0.0100, released 2020-12-27.
use Badge::Depot::Plugin::Githubactions;
my $badge = Badge::Depot::Plugin::Githubactions->new(user => 'my_name', repo => 'the_repo', branch => 'master', workflow => 'gh-actions-workflow');
print $badge->to_html;
# prints '<a href="https://github.com/my_name/the_repo/actions?query=workflow%3Agh-actions-workflow+branch%3Amaster"><img src="https://img.shields.io/github/workflow/status/my_name/the_repo/gh-actions-workflow/master" alt="Build status at Github" /></a>'
Create a Github Actions badge for a github repository.
This class consumes the Badge::Depot role.
The user
and repo
attributes are required or optional, depending on your configuration. It looks for the resources/repository/web
setting in META.json
:
- If
META.json
doesn't exist in the dist root,user
andrepo
are required. - If
resources/repository/web
doesn't exist (or is not a github url),user
andrepo
are required.
Github username.
Github repository.
The name of the Github Actions workflow. Required.
Github branch. Optional, no default.
https://github.com/Csson/p5-Badge-Depot-Plugin-Githubactions
https://metacpan.org/release/Badge-Depot-Plugin-Githubactions
Erik Carlsson [email protected]
This software is copyright (c) 2020 by Erik Carlsson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.