From 9bee8e887f46f1f291ad781254c52e4fd1182b23 Mon Sep 17 00:00:00 2001 From: Dayton <5340801+watbulb@users.noreply.github.com> Date: Sun, 8 Sep 2024 10:52:26 -0600 Subject: [PATCH 1/5] Create docker-image.yml --- .github/workflows/docker-image.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..072a0fc --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,20 @@ +name: Docker Image CI + +on: + push: + branches: [ "main", "ci-test" ] + pull_request: + branches: [ "main", "ci-test", "tt08", "tt09" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker base image + run: docker build -t ol2-base -f docker/base.dockerfile . + - name: Build the Docker main image + run: docker build -t ol2-main -f docker/ol2.dockerfile . From 179f2b0b0462c74db325a76fac9b7469d8b947d0 Mon Sep 17 00:00:00 2001 From: watbulb Date: Sun, 8 Sep 2024 17:00:09 +0000 Subject: [PATCH 2/5] fix pubkey adding --- docker/ol2.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/ol2.dockerfile b/docker/ol2.dockerfile index c9bf865..49ff585 100644 --- a/docker/ol2.dockerfile +++ b/docker/ol2.dockerfile @@ -71,8 +71,8 @@ RUN chmod +x /*.sh # Public Keys COPY pubkey/* /root/.ssh/ -RUN cat /root/.ssh/*.pub >> /root/.ssh/authorized_keys && \ - rm /root/.ssh/*.pub +RUN test -f /root/.ssh/*.pub && cat /root/.ssh/*.pub >> /root/.ssh/authorized_keys && \ + rm -f /root/.ssh/*.pub # Profile RUN echo "source $VOLUME_ROOT/syn.env && cd $VOLUME_ROOT" >> ~/.profile From e43abbf738fbbf2e37d6f193da3a1643ff019a93 Mon Sep 17 00:00:00 2001 From: watbulb Date: Sun, 8 Sep 2024 17:05:06 +0000 Subject: [PATCH 3/5] add a dummy pub because I don't have time to figure out how to make this conditional --- docker/ol2.dockerfile | 2 +- pubkey/dummy.pub | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 pubkey/dummy.pub diff --git a/docker/ol2.dockerfile b/docker/ol2.dockerfile index 49ff585..f19571e 100644 --- a/docker/ol2.dockerfile +++ b/docker/ol2.dockerfile @@ -71,7 +71,7 @@ RUN chmod +x /*.sh # Public Keys COPY pubkey/* /root/.ssh/ -RUN test -f /root/.ssh/*.pub && cat /root/.ssh/*.pub >> /root/.ssh/authorized_keys && \ +RUN cat /root/.ssh/*.pub >> /root/.ssh/authorized_keys && \ rm -f /root/.ssh/*.pub # Profile diff --git a/pubkey/dummy.pub b/pubkey/dummy.pub new file mode 100644 index 0000000..077960f --- /dev/null +++ b/pubkey/dummy.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC/k/QhVeQ0LRfbQ1Fjxj/Emgbj+RcO5a1sr+YlqYO3IUUOaLa0XhEWwO6JUfaMv56edYVDxp1b1yRpvsvDa9WhtherV+9w8wiTDWJbUUYf27TOvzYyLwlyEVLjQFj37m6SEsZ+WHUa2HnMVhvMDZdx07CD84mG3rN57KiSWfW1lCZLJ8mlv4bjH/XrF3FgOzg+UXgMN4NdTEgq3ACwBw/lbcLdbDts3ICx/0kFD5BMFyjX3+xuimhJweuf3tdB+rxrSzX3F/V9N49bQSV4G0ai0I89PT/zUNB70j1it7LVKKaPL6WTX4aq0ghds6wvsxPYLTWxHo7Bhv8vH2n+T+EjxlY/65fqccewG6tbS92gQ/S/mjh1zNT4sxi50jvjhiR2CSb0YZ4pr3ZWOPU0IvDT8bH5EFbqsNAQAgTXWRqNROgZ0MN7t2Sc2k2zwePj7nclLLV/H818dGicU9Q0PqN0H1fxCAdwweywpWqJ6Aewsli0RLAfRK1K5JxMdFV5h+8= root@56830376c43918 From 0657f1c75e307b57ec4025f7234dedff9bd50cf8 Mon Sep 17 00:00:00 2001 From: Dayton <5340801+watbulb@users.noreply.github.com> Date: Sun, 8 Sep 2024 11:09:13 -0600 Subject: [PATCH 4/5] Update README.md add badge.svg for docker build action --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index afc47fd..7b494d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## TinyTapeout Local Linux Toolchain Builder +![](../../workflows/docker-image/badge.svg) + **Current Version: TT08** **Disk Requirement: ~13-15GB** @@ -95,4 +97,4 @@ $ ./fly-machine.sh update ol2-main ### TODO: -- [ ] Extract docker build to standard bash scripts \ No newline at end of file +- [ ] Extract docker build to standard bash scripts From d75acb4ffd88447e578a363e13b4929698ea7018 Mon Sep 17 00:00:00 2001 From: Dayton <5340801+watbulb@users.noreply.github.com> Date: Sun, 8 Sep 2024 11:11:53 -0600 Subject: [PATCH 5/5] Update README.md actually add the proper badge url this time ... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b494d2..bae2f87 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## TinyTapeout Local Linux Toolchain Builder -![](../../workflows/docker-image/badge.svg) +![docker-build](https://github.com/watbulb/tt-toolchain-build/actions/workflows/docker-image.yml/badge.svg) **Current Version: TT08**