From 375642bb5ebc697da6c2469eec3b4223c06f7f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Fri, 20 Sep 2024 12:21:26 +0200 Subject: [PATCH] Enter Forgejo Actions with Nickel --- .forgejo/workflows/ci.ncl | 48 ++++++++++++++++++++++++++++++++++++++ .forgejo/workflows/ci.yaml | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 .forgejo/workflows/ci.ncl create mode 100644 .forgejo/workflows/ci.yaml diff --git a/.forgejo/workflows/ci.ncl b/.forgejo/workflows/ci.ncl new file mode 100644 index 0000000..a73b0aa --- /dev/null +++ b/.forgejo/workflows/ci.ncl @@ -0,0 +1,48 @@ +{ + on = { + push.branches = ["main"], + pull_request.types = ["opened", "synchronize", "reopened"], + }, + + jobs = + std.record.from_array + ( + std.array.flatten + [ + ( + std.array.map + ( + fun c => + { + field = "nixosConfiguration-%{c}", + value = { + runs-on = "native", + steps = [ + { uses = "actions/checkout@v4" }, + { run = "nix build .#nixosConfigurations.%{c}.config.system.build.toplevel" }, + ] + } + } + ) + ["all", "mastodon", "peertube", "pixelfed"] + ), + ( + std.array.map + ( + fun c => + { + field = "check-%{c}", + value = { + runs-on = "native", + steps = [ + { uses = "actions/checkout@v4" }, + { run = "nix build .#checks.x86_64-linux.%{c} -L" }, + ] + } + } + ) + ["mastodon-garage", "pixelfed-garage"] + ) + ] + ), +} diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml new file mode 100644 index 0000000..89f7bcf --- /dev/null +++ b/.forgejo/workflows/ci.yaml @@ -0,0 +1,41 @@ +## This file was generated by Nickel. Edit `ci.ncl` instead, and export to YAML. +jobs: + check-mastodon-garage: + runs-on: native + steps: + - uses: actions/checkout@v4 + - run: nix build .#checks.x86_64-linux.mastodon-garage -L + check-pixelfed-garage: + runs-on: native + steps: + - uses: actions/checkout@v4 + - run: nix build .#checks.x86_64-linux.pixelfed-garage -L + nixosConfiguration-all: + runs-on: native + steps: + - uses: actions/checkout@v4 + - run: nix build .#nixosConfigurations.all.config.system.build.toplevel + nixosConfiguration-mastodon: + runs-on: native + steps: + - uses: actions/checkout@v4 + - run: nix build .#nixosConfigurations.mastodon.config.system.build.toplevel + nixosConfiguration-peertube: + runs-on: native + steps: + - uses: actions/checkout@v4 + - run: nix build .#nixosConfigurations.peertube.config.system.build.toplevel + nixosConfiguration-pixelfed: + runs-on: native + steps: + - uses: actions/checkout@v4 + - run: nix build .#nixosConfigurations.pixelfed.config.system.build.toplevel +on: + pull_request: + types: + - opened + - synchronize + - reopened + push: + branches: + - main