forked from Drewsif/PiShrink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a GitHub Actions workflow to test the action with Pimod (#1)
* Make a GitHub Actions workflow to test the action with Pimod * Troubleshoot workflow * Continue troubleshooting workflow * Fix Pifile syntax error * Continue troubleshooting cowsay * Run pishrink with sudo
- Loading branch information
Showing
3 changed files
with
116 additions
and
10 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,58 @@ | ||
name: build-os | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**/README.md' | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**/README.md' | ||
merge_group: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Make a Pifile for Pimod | ||
uses: 1arp/create-a-file-action@0.4.5 | ||
with: | ||
file: cowsay.Pifile | ||
content: | | ||
FROM https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz | ||
TO cowsay-image.img | ||
PUMP 8G | ||
# Install and test out cowsay: | ||
RUN apt-get update | ||
RUN apt-get install -y cowsay | ||
RUN /usr/games/cowsay "I'm running in a chroot!" | ||
- name: Build the image | ||
uses: Nature40/pimod@master | ||
with: | ||
pifile: cowsay.Pifile | ||
|
||
- name: Shrink the image | ||
uses: ./ | ||
with: | ||
image: cowsay-image.img | ||
compress: gzip | ||
compress-parallel: true | ||
|
||
- name: Upload image to Job Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cowsay-image | ||
path: cowsay-image.img.gz | ||
if-no-files-found: error | ||
retention-days: 0 | ||
compression-level: 0 | ||
overwrite: true |
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