From 4978decdb671f1da2d258970fea0e0e803e80d46 Mon Sep 17 00:00:00 2001 From: Aidan Beery <33035822+Aidan-B1409@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:07:41 -0700 Subject: [PATCH 1/4] Create docker-image.yml Add Github Actions workflow for building armv6 containers (for rPI 5) --- .github/workflows/docker-image.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..ae2a6b8 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,54 @@ +name: Build Docker Image for Raspberry Pi + +on: + push: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # 1. Pull the codebase into the runner environment + - name: Checkout Code + uses: actions/checkout@v4 + + # 2. Set up QEMU static binaries to handle cross-platform emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + with: + platforms: arm64,arm + + # 3. Spin up a Docker BuildKit container instance + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # 4. Authenticate to the container registry (GHCR Example) + - name: Log in to GitHub Container Registry + uses: docker/login-action@v4 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # 5. Extract tag and label information to maintain organized releases + - name: Extract Metadata + id: meta + uses: docker/metadata-action@v6 + with: + images: aidanb1409/compostsense_firmware + tags: | + type=raw,value=latest + + # 6. Run Buildx execution to build and push the Pi container + - name: Build and Push Image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + platforms: linux/arm64,linux/arm/v7 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + # Leverages GitHub local cache so subsequent runs build instantly + cache-from: type=gha + cache-to: type=gha,mode=max From 9cc091a855dc815f390d20a131c2435dbff60310 Mon Sep 17 00:00:00 2001 From: Aidan Beery <33035822+Aidan-B1409@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:17:40 -0700 Subject: [PATCH 2/4] breaking change (yes, I know, in prod.) Add dummy AWS credentials file, pending deprecating of AWS SecreteManager --- .aws/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 .aws/test.txt diff --git a/.aws/test.txt b/.aws/test.txt new file mode 100644 index 0000000..eb0499f --- /dev/null +++ b/.aws/test.txt @@ -0,0 +1 @@ +ERROR - HARD-CODED AWS CREDENTIALS From 6b1740fba58b0a09c1c1609e52b2649325d07ce7 Mon Sep 17 00:00:00 2001 From: Aidan Beery <33035822+Aidan-B1409@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:26:41 -0700 Subject: [PATCH 3/4] Update docker-image.yml Allow compilation to be triggered on dev branch --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ae2a6b8..3f0042c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,7 @@ name: Build Docker Image for Raspberry Pi on: push: - branches: [ "main" ] + branches: [ "main", "env_modernization"] jobs: build: From c5a452b166e0c456dfb37d7ff94b6c665f90a072 Mon Sep 17 00:00:00 2001 From: Aidan Beery <33035822+Aidan-B1409@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:32:04 -0700 Subject: [PATCH 4/4] Update test.txt --- .aws/test.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.aws/test.txt b/.aws/test.txt index eb0499f..1ac079d 100644 --- a/.aws/test.txt +++ b/.aws/test.txt @@ -1 +1,2 @@ ERROR - HARD-CODED AWS CREDENTIALS +bump commit 1 to trigger gh action