GitHub::Actions

Write GitHub Actions using Raku

GitHub::Actions for Raku

Use the GitHub actions console API easily from Raku. Essentially, a port to Raku of the equivalent Perl module. It's mainly intended to be run inside the Raku container for GitHub actions, but can of course be used independently.

Installing

Install it the usual way, using zef:

zef install GitHub::Actions

Also use it from the companion Docker image,

docker pull --rm -it --entrypoint=/bin/sh ghcr.io/jj/raku-github-actions:latest

Running

This is a version derived from the base Raku image for GHA with this module and its dependencies installed. You can use it directly in your GitHub actions, for instance like this:

- name: Test output
  id: output_test
  shell: raku {0}
  run: use GitHub::Actions;
    set-output( 'FOO', 'BAR');

Check the Pod6 here for methods available.

Synopsis


use GitHub::Actions:

say %github; # Contains all GITHUB_xyz variables

set-output('FOO','BAR');
set-output('FOO'); # Empty value
set-env("FOO", "bar");
debug('FOO');
error('FOO');
warning('FOO');

error-on-file('FOO', 'foo.pl', 1,1 );

warning-on-file('FOO', 'foo.raku', 1,1 );

# sets group
start-group( "foo" );
warning("bar");
end-group;

See also

Created from the Raku distribution template.

License

(c) JJ Merelo, [email protected], 2022 Licensed, under the Artistic 2.0 License (the same as Raku itself).

GitHub::Actions v0.0.1

Write GitHub Actions using Raku

Authors

  • JJ Merelo

License

Artistic-2.0

Dependencies

Provides

  • GitHub::Actions

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.