-
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build image function to GitHub Actions
This uses a script primarily written by Holger Friedrich with a few edits. Co-authored-by: Holger Friedrich <[email protected]> Signed-off-by: Ethan Dye <[email protected]>
- Loading branch information
Showing
5 changed files
with
121 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build Image | ||
|
||
# Trigger the workflow on push or pull request | ||
on: | ||
push: | ||
paths: | ||
- '**.bash' | ||
- '**.sh' | ||
- '!test.bash' | ||
pull_request: | ||
paths: | ||
- '**.bash' | ||
- '**.sh' | ||
- '!test.bash' | ||
|
||
jobs: | ||
build32: | ||
# Using latest Ubuntu (not the GitHub Actions default) to get latest tool versions in GitHub Actions environment | ||
runs-on: ubuntu-20.04 | ||
|
||
if: github.actor == github.event.repository.owner.login | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Environment variables | ||
run: sudo -E bash -c set | ||
- name: Install required packages | ||
run: sudo apt-get install git wget unzip libarchive-zip-perl dos2unix xz-utils kpartx | ||
- name: Run build.bash rpi | ||
run: sudo -E ./build.bash rpi | ||
- name: getfilename | ||
id: getfilename | ||
run: echo "::set-output name=file::$(ls openhabian-*.img)" | ||
- name: Archive | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: ${{ steps.getfilename.outputs.file }} | ||
# Directory containing files to upload | ||
path: ${{ steps.getfilename.outputs.file }} | ||
build64experimental: | ||
# Using latest Ubuntu (not the GitHub Actions default) to get latest tool versions in GitHub Actions environment | ||
runs-on: ubuntu-20.04 | ||
|
||
if: github.actor == github.event.repository.owner.login | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Environment variables | ||
run: sudo -E bash -c set | ||
- name: Install required packages | ||
run: sudo apt-get install git wget unzip libarchive-zip-perl dos2unix xz-utils kpartx | ||
- name: Run build.bash rpi64 | ||
run: sudo -E ./build.bash rpi64 | ||
- name: getfilename | ||
id: getfilename | ||
run: echo "::set-output name=file::$(ls openhabian-*.img)" | ||
- name: Archive | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: ${{ steps.getfilename.outputs.file }} | ||
# Directory containing files to upload | ||
path: ${{ steps.getfilename.outputs.file }} |
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
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
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,4 @@ | ||
FROM balenalib/intel-nuc-ubuntu:focal-build | ||
FROM balenalib/amd64-ubuntu:focal-build | ||
|
||
|
||
ENV container docker | ||
|
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