mirror of
https://github.com/ruuda/rcl.git
synced 2025-10-09 16:32:11 +00:00
Add a GitHub Actions example
GitHub Actions is one of those things that tends to have a lot of repetition, where RCL may come in handy.
This commit is contained in:
parent
0a30d29c25
commit
33391d2ea1
1 changed files with 35 additions and 0 deletions
35
examples/github_actions.rcl
Normal file
35
examples/github_actions.rcl
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
name = "Build";
|
||||
|
||||
on = {
|
||||
push = { branches = ["master"]; };
|
||||
workflow_dispatch = {};
|
||||
};
|
||||
|
||||
jobs = {
|
||||
"Build": {
|
||||
runs-on = "ubuntu-22.04";
|
||||
steps = [
|
||||
{
|
||||
name = "Checkout";
|
||||
uses = "actions/checkout@v3.5.3";
|
||||
},
|
||||
{
|
||||
name = "Install Nix";
|
||||
uses = "cachix/install-nix-action@v18";
|
||||
with = {
|
||||
install_url = "https://releases.nixos.org/nix/nix-2.11.0/install";
|
||||
};
|
||||
},
|
||||
{
|
||||
name = "Build application";
|
||||
run =
|
||||
"""
|
||||
nix build --print-build-logs
|
||||
echo "Build ok"
|
||||
""";
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue