diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml new file mode 100644 index 0000000..79a7c36 --- /dev/null +++ b/.gitea/workflows/demo.yaml @@ -0,0 +1,28 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: debian-latest + container: + image: "node:23" + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + build-site: + runs-on: debian-latest + container: + image: "node:23" + steps: + - name: checkout-code + uses: https://data.forgejo.org/actions/checkout@v4 diff --git a/nixos-apps/git.ewanick.com.nix b/nixos-apps/git.ewanick.com.nix index f086848..265a321 100644 --- a/nixos-apps/git.ewanick.com.nix +++ b/nixos-apps/git.ewanick.com.nix @@ -1,46 +1,49 @@ { pkgs, ... }: -let baseUrl = "git.ewanick.com"; +let + baseUrl = "git.ewanick.com"; + PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/git.ewanick.com"; in { services.gitea = { enable = true; appName = "Bill's Gitea server, hosted on Linode using NixOS"; + lfs.enable = true; settings = { server = { DOMAIN = baseUrl; ROOT_URL = "https://${baseUrl}/"; HTTP_PORT = 3000; }; - service = { - DISABLE_REGISTRATION = true; + service.DISABLE_REGISTRATION = true; + + actions = { + ENABLED = true; + DEFAULT_ACTIONS_URL = "github"; }; - # actions = { - # ENABLED = true; - # DEFAULT_ACTIONS_URL = "self"; - # }; }; }; - # services.gitea-actions-runner.instances = { - # "first-runner" = { - # enable = true; - # url = baseUrl; - # tokenFile = ./git.ewanick.com/tokenFile; - # hostPackages = with pkgs; [ - # bash - # coreutils - # curl - # gawk - # gitMinimal - # gnused - # wget - # ]; - # name = "linode-nixos"; - # labels = [ - # "native:host" - # ]; - # }; - # }; + services.gitea-actions-runner = { + instances.default = { + enable = true; + name = "linode-nixos"; + url = "https://${baseUrl}/"; + tokenFile = "${PROJECT_ROOT}/tokenFile"; + hostPackages = with pkgs; [ + bash + coreutils + curl + gawk + gitMinimal + gnused + wget + ]; + labels = [ + "debian-latest:docker://node:23-bookworm" + "native:host" + ]; + }; + }; services.caddy = { enable = true; @@ -52,6 +55,8 @@ in }; }; }; + + virtualisation.docker.enable = true; }