From e22bdc1545f686f97c866107ea4462d766fac9fb Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 10:34:40 -0800 Subject: [PATCH 1/7] change yaml tab space --- .editorconfig | 2 +- .github/workflows/format.yml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index bbf92a5..8adb3e6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,5 +6,5 @@ insert_final_newline = true indent_style = space indent_size = 4 -[*.nix] +[*.{yml,yaml,nix}] indent_size = 2 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 79e544f..130c1b1 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,22 +1,22 @@ name: Format on: - push: - pull_request: + push: + pull_request: jobs: - format: - runs-on: ubuntu-latest - name: Format Files - steps: - - uses: actions/checkout@v3 - - uses: oven-sh/setup-bun@v2 - - run: bun install - - name: Prettier - run: bun run format ./src - env: - GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} - - uses: stefanzweifel/git-auto-commit-action@v4 - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - with: - commit_message: 'style: format files' + format: + runs-on: ubuntu-latest + name: Format Files + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - name: Prettier + run: bun run format ./src + env: + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + with: + commit_message: 'style: format files' From 5e3f80e93c099d522613fb00942635622113cfc9 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 10:34:49 -0800 Subject: [PATCH 2/7] fix build action --- .github/workflows/build.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c745662..2a0b2f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,21 +1,15 @@ name: Build on: - pull_request: + pull_request: jobs: - format: - runs-on: ubuntu-latest - name: Build Application - steps: - - name: Checkout - - uses: actions/checkout@v3 - - - name: Setup - - uses: oven-sh/setup-bun@v2 - - - name: Install - - run: bun install - - - name: Build - - run: bun run build + format: + runs-on: ubuntu-latest + name: Build Application + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - name: Build + run: bun run build From 68a83c43a12584e568f4921793f3f798a468757e Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 10:41:31 -0800 Subject: [PATCH 3/7] add prettier to nix dev shell --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index c26c8a9..c97fbc6 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ bun + nodePackages.prettier ]; }; }); From d82611f54a0191f56d96f72fc94849bbcc9be3bd Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 10:45:07 -0800 Subject: [PATCH 4/7] add check for nix dev shell --- .github/workflows/nix.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/nix.yml diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..25269ef --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,19 @@ +on: + push: + paths: + - 'flake.nix' + +jobs: + nix-check: + name: Check Nix Dev Shell + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Nix + uses: https://github.com/DeterminateSystems/nix-installer-action@v12 + - name: Magic Nix Cache + uses: https://github.com/DeterminateSystems/magic-nix-cache-action@v7 + - name: Check + run: nix flake check -L From 8a891cab91bdd8ea15a1409f845f9fa29a7cd41a Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 10:50:20 -0800 Subject: [PATCH 5/7] also check nix on pr --- .github/workflows/nix.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 25269ef..da8764f 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -1,4 +1,7 @@ on: + pull_request: + paths: + - 'flake.nix' push: paths: - 'flake.nix' From d127d28c73daba91bff6b343b9613e8a06c237e9 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 10:51:23 -0800 Subject: [PATCH 6/7] fix use path thingy :3 --- .github/workflows/nix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index da8764f..f0c33cb 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -15,8 +15,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Install Nix - uses: https://github.com/DeterminateSystems/nix-installer-action@v12 + uses: DeterminateSystems/nix-installer-action@v12 - name: Magic Nix Cache - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@v7 + uses: DeterminateSystems/magic-nix-cache-action@v7 - name: Check run: nix flake check -L From 4335ce6c057e72698e5d67ac313e4160650f140a Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 10 Dec 2024 11:44:39 -0800 Subject: [PATCH 7/7] add inputs to flake.nix --- flake.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flake.nix b/flake.nix index c97fbc6..29857ea 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,9 @@ { + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, nixpkgs,