diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml deleted file mode 100644 index e87c3c4..0000000 --- a/.github/workflows/on-push.yml +++ /dev/null @@ -1,39 +0,0 @@ -# name: Testing only -# on: -# push: -# tags: [ '*' ] - -# jobs: -# build: -# runs-on: ubuntu-18.04 -# steps: -# - uses: actions/checkout@v1 -# - name: Enable experimental features in Docker -# run: | -# sudo rm -rf /etc/docker/daemon.json -# echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json -# sudo systemctl restart docker -# - name: Run Build script -# run: sudo ./build-test.sh - -# - name: Create Release -# id: create_release -# uses: actions/create-release@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# tag_name: ${{ github.ref }} -# release_name: Release ${{ github.ref }} -# draft: false -# prerelease: true - -# - name: Upload Release Asset -# id: upload-release-asset -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /home/runner/docker.tar.gz -# asset_name: docker.tar.gz -# asset_content_type: application/gzip diff --git a/.github/workflows/on-tag-only.yml b/.github/workflows/on-tag-only.yml index 8a73116..a5005ec 100644 --- a/.github/workflows/on-tag-only.yml +++ b/.github/workflows/on-tag-only.yml @@ -9,21 +9,34 @@ jobs: runs-on: ubuntu-18.04 steps: - + - uses: actions/checkout@v1 + - name: Run Apt-get update run: sudo apt-get update - - name: Install Dependencies + - name: Install dependencies run: sudo apt-get -y install quilt qemu-user-static debootstrap bsdtar + - name: Nuke current Docker installation + run: | + sudo systemctl stop docker + sudo apt-get purge docker-ce docker-ce-cli containerd.io moby-engine moby-cli + sudo rm -rf /var/lib/docker + + - name: Re-install Docker + run: | + curl -fsSL https://get.docker.com -o get-docker.sh + sudo sh get-docker.sh + docker --version + - name: Enable experimental features in Docker run: | sudo rm -rf /etc/docker/daemon.json echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json sudo systemctl restart docker - - name: Run Build script + - name: Run build script run: sudo ./build.sh - name: Copy ZIP to current working dir @@ -31,22 +44,8 @@ jobs: - name: Debug current working dir run: ls -la - - # - name: Release Image to placeholder or release - # uses: meeDamian/github-release@2.0 - # if: startsWith(github.ref, 'refs/tags/') - # with: - # gzip: false - # files: "*.zip" - # token: ${{ secrets.GITHUB_TOKEN }} - # allow_override: true - - # - name: Upload artifact - # uses: actions/upload-artifact@v2 - # with: - # path: "*.zip" - - name: Create Release + - name: Create release id: create_release uses: actions/create-release@v1 env: @@ -55,9 +54,9 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: false - prerelease: true + prerelease: false - - name: Upload Release Asset + - name: Upload image id: upload-release-asset uses: actions/upload-release-asset@v1 env: diff --git a/build-test.sh b/build-test.sh deleted file mode 100755 index e3c8b2e..0000000 --- a/build-test.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -e -set -x - -uname -m - -echo "Removing Docker" -docker ps -docker images -a -du -sh /var/lib/docker/overlay2 -sudo systemctl stop docker -sudo apt-get purge docker-ce docker-ce-cli containerd.io moby-engine moby-cli -sudo rm -rf /var/lib/docker - -curl -fsSL https://get.docker.com -o get-docker.sh -sudo sh get-docker.sh -docker --version -docker ps -docker images -a -sudo rm -rf /etc/docker/daemon.json -echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json - - -wget -q "https://raw.githubusercontent.com/getumbrel/umbrel-compose/master/docker-compose.yml" -IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq) - - -# echo "Pulling images in docker" -# while IFS= read -r image; do -# docker pull --platform=linux/arm/v7 $image -# done <<< "$IMAGES" -docker pull --platform=linux/arm/v7 alpine:3.11 -docker images -a - -du -sh /var/lib/docker -cd /var/lib -tar -czvf ~/docker.tar.gz docker -du -h ~/docker.tar.gz -# ls dockerpi -# ls dockerpi/var/lib/tor -# docker save $IMAGES -o umbrel-docker-images.tar -# du -h umbrel-docker-images.tar -# docker save $IMAGES | gzip > umbrel-docker-images.tar.gz -# du -h umbrel-docker-images.tar.gz \ No newline at end of file diff --git a/stage2/05-docker-compose/01-run.sh b/stage2/05-docker-compose/01-run.sh index 19ab702..aebd65c 100755 --- a/stage2/05-docker-compose/01-run.sh +++ b/stage2/05-docker-compose/01-run.sh @@ -29,26 +29,7 @@ echo "Copying the compose service to rootfs (etc/init.d)" cp files/compose-service ${ROOTFS_DIR}/etc/init.d/umbrelbox -echo "Docker stuff installed!" - -echo "Bundling Docker images required to run Umbrel services" - -echo "Removing Docker" -docker ps -docker images -a -du -sh /var/lib/docker/overlay2 -sudo systemctl stop docker -sudo apt-get purge docker-ce docker-ce-cli containerd.io moby-engine moby-cli -sudo rm -rf /var/lib/docker - -curl -fsSL https://get.docker.com -o get-docker.sh -sudo sh get-docker.sh -docker --version -docker ps -docker images -a -sudo rm -rf /etc/docker/daemon.json -echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json - +echo "Pulling Docker images required to run Umbrel services" wget -q "https://raw.githubusercontent.com/getumbrel/umbrel-compose/master/docker-compose.yml" IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq) @@ -58,8 +39,5 @@ while IFS= read -r image; do docker pull --platform=linux/arm/v7 $image done <<< "$IMAGES" -# docker save $IMAGES | gzip > umbrel-docker-images.tar.gz -# du -h umbrel-docker-images.tar.gz mkdir -p ${ROOTFS_DIR}/var/lib/docker -rsync -avPHSX /var/lib/docker ${ROOTFS_DIR}/var/lib/ -# cp umbrel-docker-images.tar.gz ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/umbrel-docker-images.tar.gz \ No newline at end of file +rsync -avPHSX /var/lib/docker ${ROOTFS_DIR}/var/lib/ \ No newline at end of file