From 6a963457602a087dddce3a71f24726d9f9b3e46a Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 29 Oct 2023 23:52:33 +0100 Subject: [PATCH 1/2] feat: enable gitea actions in forgejo See: https://docs.gitea.com/usage/actions/quickstart --- .forgejo/workflows/check.yml | 12 ++++++++++++ hosts/nachtigall/apps/forgejo.nix | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 .forgejo/workflows/check.yml diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml new file mode 100644 index 00000000..cb57fb9b --- /dev/null +++ b/.forgejo/workflows/check.yml @@ -0,0 +1,12 @@ +name: Flake checks +on: [push] + +jobs: + Check: + runs-on: nix-flakes + steps: + - name: Check out repository code + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Run flake checks + run: | + nix --print-build-logs --verbose --accept-flake-config flake check diff --git a/hosts/nachtigall/apps/forgejo.nix b/hosts/nachtigall/apps/forgejo.nix index f2f1e119..08fd9923 100644 --- a/hosts/nachtigall/apps/forgejo.nix +++ b/hosts/nachtigall/apps/forgejo.nix @@ -78,6 +78,11 @@ session = { COOKIE_SECURE = lib.mkForce true; }; + # See https://forgejo.org/docs/latest/admin/actions/ + actions.ENABLED = true; + # In an actions workflow, when uses: does not specify an absolute URL, + # the value of DEFAULT_ACTIONS_URL is prepended to it. + actions.DEFAULT_ACTIONS_URL = "https://code.forgejo.org"; }; }; From 487e12015a30a9101dc58cf9b354537568b8348c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 6 Nov 2023 22:05:25 +0100 Subject: [PATCH 2/2] ci: add pub-solar cachix https://app.cachix.org --- .forgejo/workflows/check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml index cb57fb9b..89475a43 100644 --- a/.forgejo/workflows/check.yml +++ b/.forgejo/workflows/check.yml @@ -7,6 +7,10 @@ jobs: steps: - name: Check out repository code uses: https://code.forgejo.org/actions/checkout@v4 + - name: Prepare cachix + uses: https://github.com/cachix/cachix-action@v12 + with: + name: pub-solar - name: Run flake checks run: | nix --print-build-logs --verbose --accept-flake-config flake check