Skip to content

Commit

Permalink
Create github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
timower committed Sep 28, 2023
1 parent 13c4ac9 commit 5fa2d27
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v5
with:
target: qemu-base
cache-from: type=gha
cache-to: type=gha,mode=max


7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ ENV PATH=/opt/bin:$PATH

# First boot, disable xochitl, sync time, and save state
RUN run_vm.sh -serial null -daemonize && \
ssh -o StrictHostKeyChecking=no root@localhost 'systemctl stop rm-sync && systemctl mask rm-sync' && \
ssh -o StrictHostKeyChecking=no root@localhost 'systemctl mask xochitl' && \
ssh -o StrictHostKeyChecking=no root@localhost 'while ! timedatectl status | grep "synchronized: yes"; do sleep 1; done' && \
wait_ssh.sh && \
ssh root@localhost 'systemctl stop rm-sync && systemctl mask rm-sync' && \
ssh root@localhost 'systemctl mask xochitl' && \
ssh root@localhost 'while ! timedatectl status | grep "synchronized: yes"; do sleep 1; done' && \
save_vm.sh

# Mount to presist rootfs
Expand Down
7 changes: 7 additions & 0 deletions bin/wait_ssh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
echo "Waiting for ssh to come up..."
while ! ssh -o StrictHostKeyChecking=no root@localhost true
do
sleep 1
done
echo "Done!"

0 comments on commit 5fa2d27

Please sign in to comment.