diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9643546..897e1bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -117,7 +117,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} deploy-docker: - name: Deploy (Docker Hub) + name: Deploy (Docker) runs-on: ubuntu-latest needs: semantic if: needs.semantic.outputs.published == 'true' @@ -141,17 +141,17 @@ jobs: # If source files changed but packages didn't, rebuild from a prior cache. restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - - name: Log in to Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + - uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 with: - images: rainbowcafe/silvy + images: ghcr.io/ribbon-studios/silvy tags: | type=raw,value=${{ needs.semantic.outputs.major }} type=raw,value=${{ needs.semantic.outputs.major }}.${{ needs.semantic.outputs.minor }} @@ -165,16 +165,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: Push README to Dockerhub - uses: christian-korneck/update-container-description-action@v1 - env: - DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASS: ${{ secrets.DOCKER_PASSWORD }} - with: - destination_container_repo: rainbowcafe/silvy - provider: dockerhub - readme_file: 'README.md' - deploy-netlify: name: Deploy (Netlify) runs-on: ubuntu-latest diff --git a/README.md b/README.md index a85d983..c8657e3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ _**⚠️ This repo is still a WIP and things are always subject to change. ⚠️**_ -[![Docker Hub Version](https://img.shields.io/docker/v/rainbowcafe/silvy?label=Docker%20Hub%20Version)](https://hub.docker.com/repository/docker/rainbowcafe/silvy) - -[![Coveralls](https://img.shields.io/coveralls/github/rain-cafe-xiv/silvy)](https://coveralls.io/github/rain-cafe-xiv/silvy) +[![Coveralls](https://img.shields.io/coveralls/github/ribbon-studios/silvy)](https://coveralls.io/github/ribbon-studios/silvy) ## Silvy @@ -34,8 +32,8 @@ $ docker run -d \ -e DISCORD_CLIENT_ID="" \ -e DISCORD_SECRET="" \ -e DATABASE_URL="" \ - --name discord-bot \ - rainbowcafe/silvy + --name silvy \ + ghcr.io/ribbon-studios/silvy:latest ``` #### 🐋 Docker Compose @@ -44,9 +42,9 @@ $ docker run -d \ version: "3" services: - discord-bot: - image: rainbowcafe/silvy:latest - container_name: discord-bot + silvy: + image: ghcr.io/ribbon-studios/silvy:latest + container_name: silvy tty: true stdin_open: true restart: unless-stopped diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f01c2b9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1712608508, + "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..232d80d --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Silvy"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { nixpkgs, ... }: let + forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; + in { + # Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy) + devShells = forAllSystems (systems: + let pkgs = nixpkgs.legacyPackages.${systems}; + in import ./shell.nix { inherit pkgs; } + ); + }; +} diff --git a/nixpkgs.nix b/nixpkgs.nix new file mode 100644 index 0000000..e6e07cb --- /dev/null +++ b/nixpkgs.nix @@ -0,0 +1,8 @@ +# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file +# Useful to avoid using channels when using legacy nix commands +let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; +in +import (fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; + sha256 = lock.narHash; +}) diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..50064c7 --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +# Shell for bootstrapping flake-enabled nix and home-manager +# Enter it through 'nix develop' or (legacy) 'nix-shell' + +{ pkgs ? (import ./nixpkgs.nix) { } }: { + default = pkgs.mkShell { + # Enable experimental features without having to specify the argument + NIX_CONFIG = "experimental-features = nix-command flakes"; + buildInputs = with pkgs; [ + gnumake + nixpkgs-fmt + nixd + bun + nodejs_20 + ]; + }; +} diff --git a/src/components/universal/Footer.tsx b/src/components/universal/Footer.tsx index 7c9712e..371a83e 100644 --- a/src/components/universal/Footer.tsx +++ b/src/components/universal/Footer.tsx @@ -30,7 +30,7 @@ export function Footer() {