diff --git a/.github/workflows/stakpak-agent.yaml b/.github/workflows/stakpak-agent.yaml new file mode 100644 index 00000000..db48ed8d --- /dev/null +++ b/.github/workflows/stakpak-agent.yaml @@ -0,0 +1,37 @@ +name: Stakpak Agent +on: + workflow_dispatch: + inputs: + prompt: + description: Request to run the agent with + required: true + +jobs: + run_agent: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@v14 + + - uses: DeterminateSystems/magic-nix-cache-action@v7 + + - name: Build stakpak tools + run: | + OUT=$(nix build ./.github/workflows/stakpak#stakpak-tools --no-link --print-out-paths) + echo "$OUT/bin" >> "$GITHUB_PATH" + + - name: Tool versions + run: | + aws --version + terraform version || true + kubectl version --client=true --output=yaml | head -n 5 + gh --version + docker --version || true + + - name: Run Stakpak Agent + uses: stakpak/stakpak-action@v1.0.11 + with: + api_key: ${{ secrets.STAKPAK_API_KEY }} + prompt: ${{ inputs.prompt }} + args: "--enable-slack-tools" \ No newline at end of file diff --git a/.github/workflows/stakpak/flake.nix b/.github/workflows/stakpak/flake.nix new file mode 100644 index 00000000..088b840e --- /dev/null +++ b/.github/workflows/stakpak/flake.nix @@ -0,0 +1,45 @@ +{ + description = "Stakpak Agent CI tools"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + + outputs = { self, nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in { + packages.${system}.stakpak-tools = pkgs.symlinkJoin { + name = "stakpak-tools"; + paths = with pkgs; [ + # cloud/iac + awscli2 + azure-cli + google-cloud-sdk + terraform + # opentofu # alternative if you want drop-in replacement + sops + age + + # k8s + kubectl + helm + k9s + + # containers + docker # client, talks to GitHub runner's daemon + docker-compose + + # misc devtools + gh + jq + yq + just + coreutils + curl + ]; + }; + }; +} \ No newline at end of file diff --git a/src/components/mode-toggle.tsx b/src/components/mode-toggle.tsx index 7eb0a65d..f6b9e02a 100644 --- a/src/components/mode-toggle.tsx +++ b/src/components/mode-toggle.tsx @@ -3,8 +3,9 @@ import { Button } from "@/components/ui/button"; import { MoonIcon, SunIcon } from "@radix-ui/react-icons"; import { useTheme } from "next-themes"; +import React from "react"; -export function ModeToggle() { +const ModeToggle = React.forwardRef((_, ref) => { const { theme, setTheme } = useTheme(); return ( @@ -13,10 +14,15 @@ export function ModeToggle() { type="button" size="icon" className="px-2" + aria-label="switch theme" onClick={() => setTheme(theme === "dark" ? "light" : "dark")} > ); -} +}); + +ModeToggle.displayName = "ModeToggle"; + +export { ModeToggle }; diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index a815e22b..3363a6f7 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -45,6 +45,7 @@ export default function Navbar() {