diff --git a/.dockerignore b/.dockerignore index 528dda2..78b2e40 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,6 @@ sqlite.db .DS_Store dist .env +caddy/data/caddy +caddy/config/caddy +testaction.secret diff --git a/.gitea/workflows/backend.yaml b/.gitea/workflows/backend.yaml new file mode 100644 index 0000000..4339515 --- /dev/null +++ b/.gitea/workflows/backend.yaml @@ -0,0 +1,25 @@ +name: backend-action +run-name: ${{ gitea.actor }} is building docker image 🚀 +on: [push] + +jobs: + build-image: + runs-on: ubuntu-20.04 + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: gitea.cognizata.com + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64 + tags: gitea.cognizata.com/atapy/sorvor:latest + target: app + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.gitignore b/.gitignore index 73c35d1..f163191 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ dist .env caddy/data/caddy caddy/config/caddy -flake.nix +testaction.secret diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..18288d1 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1713537308, + "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b0bab87 --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + with pkgs; + { + devShells.default = mkShell { + packages = with pkgs; [ + act + ]; + + shellHook = '' + ''; + }; + } + ); +}