Skip to content

Prune docker images after each pull (#133) #40

Prune docker images after each pull (#133)

Prune docker images after each pull (#133) #40

Workflow file for this run

name: Update Compile Server
on:
push:
branches: [main]
paths:
- 'server/**'
- 'compile_server_os/**'
- '.github/workflows/update-server.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-server:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
machine: [mi]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan ${{ matrix.machine }}.compute.learnbevy.com >> ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Update ${{ matrix.machine }} Server
working-directory: ./compile_server_os
run: nix run nixpkgs#nixos-rebuild -- switch --flake .#${{ matrix.machine }} --target-host root@${{ matrix.machine }}.compute.learnbevy.com