{"id":16631440,"url":"https://github.com/ethanjli/pigrow-action","last_synced_at":"2026-04-21T12:03:01.830Z","repository":{"id":241458952,"uuid":"806822593","full_name":"ethanjli/pigrow-action","owner":"ethanjli","description":"GitHub action to decompress \u0026 expand a Raspberry Pi SD card image","archived":false,"fork":false,"pushed_at":"2024-05-30T03:33:25.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T18:19:00.667Z","etag":null,"topics":["pi-image","raspberry-pi","sd-card","sd-card-image","sd-image"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethanjli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-28T01:23:18.000Z","updated_at":"2024-10-12T10:42:04.000Z","dependencies_parsed_at":"2024-05-28T13:14:42.601Z","dependency_job_id":"4d8e212c-8d63-4779-9304-0052fc4b397d","html_url":"https://github.com/ethanjli/pigrow-action","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"83ba214f16b5a0cd377d420ec760cead07a7a963"},"previous_names":["ethanjli/pigrow-action"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanjli%2Fpigrow-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanjli%2Fpigrow-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanjli%2Fpigrow-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanjli%2Fpigrow-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethanjli","download_url":"https://codeload.github.com/ethanjli/pigrow-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243104203,"owners_count":20236943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pi-image","raspberry-pi","sd-card","sd-card-image","sd-image"],"created_at":"2024-10-12T04:52:58.309Z","updated_at":"2025-12-16T10:35:21.453Z","avatar_url":"https://github.com/ethanjli.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PiGrow GitHub Action\n\nGitHub action to decompress \u0026 expand a Raspberry Pi SD card image\n\nThis action is the inverse of [ethanjli/pishrink-action](https://github.com/ethanjli/pishrink-action).\n\n## Basic Usage Examples\n\n### Grow an image to a size\n\n```yaml\n- name: Download an example image\n  run: wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz\n\n- name: Grow the image\n  uses: ethanjli/pigrow-action@v0.1.1\n  with:\n    image: 2024-03-15-raspios-bookworm-arm64-lite.img.xz\n    destination: 2024-03-15-raspios-bookworm-arm64-lite.img\n    mode: to\n    size: 8G\n\n- name: Upload the image to Job Artifacts\n  uses: actions/upload-artifact@v4\n  with:\n    name: grown-image\n    path: 2024-03-15-raspios-bookworm-arm64-lite.img\n    if-no-files-found: error\n    overwrite: true\n```\n\n### Grow an image by an amount\n\n```yaml\n- name: Download an example image\n  run: wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz\n\n- name: Grow the image\n  uses: ethanjli/pigrow-action@v0.1.1\n  with:\n    image: 2024-03-15-raspios-bookworm-arm64-lite.img.xz\n    destination: 2024-03-15-raspios-bookworm-arm64-lite.img\n    mode: by\n    size: 1G\n\n- name: Upload the image to Job Artifacts\n  uses: actions/upload-artifact@v4\n  with:\n    name: grown-image\n    path: 2024-03-15-raspios-bookworm-arm64-lite.img\n    if-no-files-found: error\n    overwrite: true\n```\n\n### Extract but don't grow an image\n\n```yaml\n- name: Download an example image\n  run: wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz\n\n- name: Extract the image\n  uses: ethanjli/pigrow-action@v0.1.1\n  with:\n    image: 2024-03-15-raspios-bookworm-arm64-lite.img.xz\n    destination: 2024-03-15-raspios-bookworm-arm64-lite.img\n\n- name: Upload the image to Job Artifacts\n  uses: actions/upload-artifact@v4\n  with:\n    name: extracted-image\n    path: 2024-03-15-raspios-bookworm-arm64-lite.img\n    if-no-files-found: error\n    overwrite: true\n```\n\n## `systemd-nspawn` Usage Example\n\nThis example job grows the image before running commands in a lightweight namespace container\n(using `systemd-nspawn`) to generate a custom image, then shrinks it before uploading as an artifact\non the GitHub Actions job:\n\n```yaml\njobs:\n  build:\n    name: Build image\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Download a base image\n        run: wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz\n\n      - name: Grow the image\n        uses: ethanjli/pigrow-action@v0.1.1\n        with:\n          image: 2024-03-15-raspios-bookworm-arm64-lite.img.xz\n          destination: cowsay-image.img\n          mode: to\n          size: 8G\n\n      - name: Build the image\n        uses: ethanjli/pinspawn-action@v0.1.1\n        with:\n          image: cowsay-image.img\n          run: |\n            apt-get update\n            apt-get install -y cowsay\n            /usr/games/cowsay 'I am running in a light-weight namespace container!'\n\n      - name: Shrink the image\n        uses: ethanjli/pishrink-action@v0.1.1\n        with:\n          image: cowsay-image.img\n          compress: gzip\n          compress-parallel: true\n\n      - name: Upload the image to Job Artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: rpi-cowsay-arm64-latest\n          path: cowsay-image.img.gz\n          if-no-files-found: error\n          retention-days: 0\n          compression-level: 0\n          overwrite: true\n```\n\n## Usage Options\n\nInputs:\n\n| Input         | Allowed values     | Required?                    | Description                                                       |\n|---------------|--------------------|------------------------------|-------------------------------------------------------------------|\n| `image`       | file path          | yes                          | Path of the image to grow.                                        |\n| `destination` | file path          | no (default random tempfile) | Path to write the grown image to.                                 |\n| `mode`        | `none`, `by`, `to` | no (default `none`)          | Grow the image by the size (`by`) or to at least the size (`to`). |\n| `size`        | size               | no (default `0`)             | Size adjustment.                                                  |\n\n- The `size` input may be an integer, a unit, or an integer followed by a unit (with no space separating them):\n\n  - Allowed units are: KB (kilobyte), K (kibibyte), MB (megabyte), M (mebibyte), G (gigabyte), GB (gibibyte), and so on for T, P, E, Z, Y\n  - For example, `1024`, `K`, and `1K` all represent a size of 1024 bytes and are interchangeable.\n  - For example, `GB` and `1GB` both represent a size of 1 gigabyte and are interchangeable.\n\nOutputs:\n\n- `destination` is the path of the grown image. If no destination path was specified in the input\n  to this action, a random path will be generated in `/tmp` as the path of the grown image.\n\n## Credits\n\nThis repository includes a modified copy of code snippets from the `from_remote.sh` module script of\n[Nature40/pimod](https://github.com/Nature40/pimod), published under the GPL-3.0 License; as a\nresult, this repository is also released under GPL-3.0-only. Here is the citation for the pimod\nproject's [scientific paper](https://jonashoechst.de/assets/papers/hoechst2020pimod.pdf):\n\n```bibtex\n@inproceedings{hoechst2020pimod,\n  author = {{Höchst}, Jonas and Penning, Alvar and Lampe, Patrick and Freisleben, Bernd},\n  title = {{PIMOD: A Tool for Configuring Single-Board Computer Operating System Images}},\n  booktitle = {{2020 IEEE Global Humanitarian Technology Conference (GHTC 2020)}},\n  address = {Seattle, USA},\n  days = {29},\n  month = oct,\n  year = {2020},\n  keywords = {Single-Board Computer; Operating System Image; System Provisioning},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanjli%2Fpigrow-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanjli%2Fpigrow-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanjli%2Fpigrow-action/lists"}