-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set version for statistics. * Try to build the hotspot version too. * Oops, wrong section. * typo * Tweak the build settings. * Delete CustomPios Submodule. Add debug info. * More forcing of the hotspot option. * Remove these debug steps. * Trying to make the image names cleaner. * Remove quotes. * Don't use env in the name. * Don't fail fast.
- Loading branch information
Showing
5 changed files
with
66 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,86 @@ | ||
name: Build Image | ||
|
||
on: | ||
schedule: | ||
# At 10:15 each day. No idea what time zone this is... | ||
- cron: '15 10 * * *' | ||
|
||
pull_request: {} | ||
push: | ||
tags: | ||
- v* | ||
|
||
|
||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
|
||
env: | ||
V1PI_VERSION: ${{ github.event_name == 'release' && github.event.release.tag_name || 'unstable' }} | ||
|
||
name: v1pi-build-${{ matrix.hotspot }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false # Allow all jobs to finish building | ||
matrix: | ||
hotspot: | ||
- hotspot | ||
- no-hotspot | ||
|
||
steps: | ||
|
||
- name: Update Dependencies | ||
run: sudo apt-get update | ||
|
||
- name: Install Dependencies | ||
run: sudo apt install coreutils p7zip-full qemu-user-static | ||
run: sudo apt-get install -y coreutils p7zip-full qemu-user-static | ||
|
||
- name: Checkout CustomPiOS | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'guysoft/CustomPiOS' | ||
path: CustomPiOS | ||
|
||
- name: Checkout Project Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
path: repository | ||
submodules: true | ||
|
||
- name: Download Raspbian Image | ||
run: cd repository/src/image && wget -q -c --trust-server-names 'https://downloads.raspberrypi.org/raspbian_lite_latest' | ||
|
||
- name: Update CustomPiOS Paths | ||
run: cd repository/src && ../../CustomPiOS/src/update-custompios-paths | ||
|
||
- name: Set the hotspot mode | ||
run: cd repository/src && echo export HOTSPOT=${{ matrix.hotspot }} > hotspot.sh | ||
|
||
- name: Build Image | ||
run: sudo modprobe loop && cd repository/src && sudo bash -x ./build_dist | ||
|
||
- name: Copy Output | ||
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspbian-buster-lite.img build.img | ||
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspbian-buster-lite.img "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".img | ||
|
||
- name: Zip Output | ||
run: gzip build.img | ||
run: zip -prq "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".zip "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".img | ||
|
||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: build.img.gz | ||
path: build.img.gz | ||
#- name: Create Release | ||
# id: create_release | ||
# uses: actions/create-release@latest | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
# with: | ||
# tag_name: ${{ github.ref }} | ||
# release_name: Release ${{ github.ref }} | ||
#- name: Upload Release | ||
# 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: build.img.gz | ||
# asset_name: build.img.gz | ||
# asset_content_type: application/octet-stream | ||
name: v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}.zip | ||
path: v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}.zip | ||
|
||
- name: Upload img to release | ||
if: ${{ github.event_name == 'release' }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}.zip | ||
asset_name: v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule CustomPiOS
deleted from
369d8c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
export DIST_NAME=V1Pi | ||
export DIST_VERSION=0.17.0 | ||
export DIST_NAME=v1pi | ||
export DIST_VERSION=0.17.1 | ||
export BASE_IMAGE_ENLARGEROOT=800 | ||
export MODULES="base(raspicam, network, nodejs, disable-services(octopi, cncjs), raspap, password-for-sudo)" | ||
|
||
source ./hotspot.sh | ||
|
||
if [[ "${HOTSPOT}" == "hotspot" ]]; then | ||
echo "Enable Hotspot" | ||
export MODULES="base(raspicam, network, nodejs, disable-services(octopi, cncjs), raspap, password-for-sudo)" | ||
else | ||
echo "Disable Hotspot" | ||
export MODULES="base(raspicam, network, nodejs, disable-services(octopi, cncjs), password-for-sudo)" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters