Skip to content

Commit

Permalink
try to free up some build space
Browse files Browse the repository at this point in the history
  • Loading branch information
willruggiano committed Apr 2, 2024
1 parent ea2795d commit 4c6cf41
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@v4
- uses: cachix/cachix-action@v14
with:
name: willruggiano
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix build --accept-flake-config
- run: nix flake check --accept-flake-config --impure
- run: nix build --accept-flake-config
- run: cachix pin willruggiano nvim-drv "$(nix build --accept-flake-config --print-out-paths)"
21 changes: 13 additions & 8 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,26 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: easimon/maximize-build-space@v10
with:
overprovision-lvm: true
remove-android: true
remove-codeql: true
remove-docker-images: true
remove-dotnet: true
remove-haskell: true
- uses: actions/checkout@v4
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: cachix/install-nix-action@v25
- uses: cachix/install-nix-action@v26
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
accept-flake-config = true
- uses: DeterminateSystems/magic-nix-cache-action@v4
- uses: cachix/cachix-action@v14
with:
name: willruggiano
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix run .#update
- run: nix build --accept-flake-config
- run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'willruggiano@users.noreply.github.com'
git commit -am 'chore: 🌶️🌶️🌶️' || exit 0
git push
- run: nix run .#ci
13 changes: 12 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@
...
}: {
apps = {
ci.program = pkgs.writeShellApplication {
name = "ci.sh";
text = ''
nix run .#update &&
nix run .#push &&
git config --global user.name 'github-actions[bot]' &&
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' &&
git commit -am 'chore: 🌶️🌶️🌶️' || exit 0
git push
'';
};
push.program = pkgs.writeShellApplication {
name = "push.sh";
runtimeInputs = with pkgs; [cachix jq];
Expand All @@ -62,7 +73,7 @@
name = "update.sh";
runtimeInputs = with pkgs; [niv];
text = ''
nix flake update &&
nix flake update --accept-flake-config &&
niv update &&
nix run .#nvim-treesitter.update-grammars -- ./pkgs/nvim-treesitter
'';
Expand Down

0 comments on commit 4c6cf41

Please sign in to comment.