Skip to content

Commit

Permalink
Add way to build on server
Browse files Browse the repository at this point in the history
  • Loading branch information
techflashYT committed Jan 7, 2024
1 parent ae5f5e8 commit eeb4ceb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to Server

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
# bit paranoid, but prevent cracking the pubkey
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
ssh-keyscan -H wii-linux.org > ~/.ssh/known_hosts
- name: Git pull on server
run: ssh root@wii-linux.org 'cd /srv/other/kernel/v4.4; git pull'

- name: Build the kernel
run: ssh root@wii-linux.org 'docker run -v /srv/other/kernel/4.4:/code -t theotherone224/wii-linux-toolchain make -j$(nproc)'

- name: Package up the modules
run: ssh root@wii-linux.org 'docker run -v /srv/other/kernel/4.4:/code -t theotherone224/wii-linux-toolchain /bin/sh -c "apt update; apt install kmod -y; make modules_install; tar czf modules.tar.gz /lib/modules/4.4*"'

# - name: Deploy new kernel & modules
# run: ssh root@wii-linux.org 'cd /wii-linux-tools/build-stack;'
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ all.config
*.kdev4
git.diff

# ignore Techflash's script to load the kernel to his Wii
wiiload.sh
# Allow saving the GitHub action
!.github

0 comments on commit eeb4ceb

Please sign in to comment.