1
0
Fork 0
dotfiles/.forgejo/workflows/build.yml
Daniel Kempkens 1e1e4d1cc9
All checks were successful
Build / build-amd64-linux (push) Successful in 43s
Build / build-arm64-linux (push) Successful in 1m15s
chore: cache build and runtime dependencies
2024-04-25 15:54:11 +02:00

59 lines
2.5 KiB
YAML

name: Build
on:
push:
branches: ['master']
paths:
- 'flake.lock'
- 'home/programs/nvim/plugins.nix'
- '.forgejo/workflows/build.yml'
schedule:
- cron: '20 4 * * *'
jobs:
build-amd64-linux:
runs-on: nix-amd64
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Cache Login
run: |
echo "Logging in ..."
attic login --set-default attic ${{ secrets.ATTIC_ENDPOINT }} ${{ secrets.ATTIC_TOKEN }}
- name: Build attic-server
run: |
nix build '.#nixosConfigurations.tanker.pkgs.attic-server'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')
- name: Build attic-client
run: |
nix build '.#nixosConfigurations.tanker.pkgs.attic-client'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')
- name: Build nginx
run: |
nix build '.#nixosConfigurations.tanker.config.services.nginx.package'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')
- name: Build neovim
run: |
nix build '.#nixosConfigurations.tanker.config.home-manager.users.daniel.programs.neovim.finalPackage'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')
build-arm64-linux:
runs-on: nix-arm64
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Cache Login
run: |
echo "Logging in ..."
attic login --set-default attic ${{ secrets.ATTIC_ENDPOINT }} ${{ secrets.ATTIC_TOKEN }}
- name: Build attic-client
run: |
nix build '.#nixosConfigurations.argon.pkgs.attic-client'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')
- name: Build nginx
run: |
nix build '.#nixosConfigurations.argon.config.services.nginx.package'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')
- name: Build neovim
run: |
nix build '.#nixosConfigurations.argon.config.home-manager.users.daniel.programs.neovim.finalPackage'
attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$')