diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 949463a..e87c3c4 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -1,39 +1,39 @@ -name: Testing only -on: - push: - tags: [ '*' ] +# 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 +# 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: 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 +# - 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 d3dcdb5..8a73116 100644 --- a/.github/workflows/on-tag-only.yml +++ b/.github/workflows/on-tag-only.yml @@ -1,47 +1,69 @@ -# name: Automatically Build image on tag ONLY -# on: -# push: -# tags: [ '*' ] +name: Automatically Build image on tag ONLY +on: + push: + tags: [ '*' ] -# jobs: -# build: +jobs: + build: -# runs-on: ubuntu-18.04 + runs-on: ubuntu-18.04 -# steps: - -# - uses: actions/checkout@v1 -# - name: Run Apt-get update -# run: sudo apt-get update - -# - name: Install Dependencies -# run: sudo apt-get -y install quilt qemu-user-static debootstrap bsdtar - -# - 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.sh - -# - name: Copy ZIP to current working dir -# run: cp deploy/*.zip ./ - -# - 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" + steps: + + - uses: actions/checkout@v1 + - name: Run Apt-get update + run: sudo apt-get update + + - name: Install Dependencies + run: sudo apt-get -y install quilt qemu-user-static debootstrap bsdtar + + - 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.sh + + - name: Copy ZIP to current working dir + run: cp deploy/*.zip ./ + + - 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 + 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: ./umbr3l-lite.zip + asset_name: umbr3l-lite.zip + asset_content_type: application/gzip diff --git a/build.sh b/build.sh index a906e10..47682ef 100755 --- a/build.sh +++ b/build.sh @@ -154,7 +154,7 @@ fi export USE_QEMU="${USE_QEMU:-0}" export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}" -export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" +export ZIP_FILENAME="${ZIP_FILENAME:-"${IMG_NAME}"}" export SCRIPT_DIR="${BASE_DIR}/scripts" export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}"