From 5ebae03d8d37c0e9a4b6d1dfb5a77f2feefcd381 Mon Sep 17 00:00:00 2001 From: Muhammad Ibtisam <174851199+ibtisam-iq@users.noreply.github.com> Date: Mon, 8 Jun 2026 20:10:03 +0500 Subject: [PATCH 1/2] ci: add act-aware guards to all build-*.yml workflows --- .github/workflows/build-dev-cicd-rootfs.yml | 9 ++++++--- .github/workflows/build-guacamole-rootfs.yml | 9 ++++++--- .github/workflows/build-jenkins-rootfs.yml | 9 ++++++--- .github/workflows/build-nexus-rootfs.yml | 9 ++++++--- .github/workflows/build-sonarqube-rootfs.yml | 9 ++++++--- .github/workflows/build-ubuntu-rootfs.yml | 9 ++++++--- 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-dev-cicd-rootfs.yml b/.github/workflows/build-dev-cicd-rootfs.yml index 9d4c99d..3999c84 100644 --- a/.github/workflows/build-dev-cicd-rootfs.yml +++ b/.github/workflows/build-dev-cicd-rootfs.yml @@ -40,6 +40,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GHCR + if: ${{ !env.ACT }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -47,6 +48,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata + if: ${{ !env.ACT }} id: meta uses: docker/metadata-action@v5 with: @@ -71,9 +73,9 @@ jobs: context: ./iximiuz/rootfs/dev/ci-cd file: ./iximiuz/rootfs/dev/ci-cd/Dockerfile platforms: linux/amd64 - load: false - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + load: ${{ !!env.ACT }} + push: ${{ !env.ACT && github.event_name != 'pull_request' }} + tags: ${{ env.ACT && format('{0}:local', env.IMAGE_NAME) || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | USER=ibtisam @@ -81,4 +83,5 @@ jobs: cache-to: type=gha,mode=max - name: Image digest + if: ${{ !env.ACT }} run: echo "Pushed ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" diff --git a/.github/workflows/build-guacamole-rootfs.yml b/.github/workflows/build-guacamole-rootfs.yml index 02e1417..0808fe7 100644 --- a/.github/workflows/build-guacamole-rootfs.yml +++ b/.github/workflows/build-guacamole-rootfs.yml @@ -42,6 +42,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GHCR + if: ${{ !env.ACT }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -49,6 +50,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata + if: ${{ !env.ACT }} id: meta uses: docker/metadata-action@v5 with: @@ -74,9 +76,9 @@ jobs: context: ./iximiuz/rootfs/guacamole file: ./iximiuz/rootfs/guacamole/Dockerfile platforms: linux/amd64,linux/arm64 - load: false - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + load: ${{ !!env.ACT }} + push: ${{ !env.ACT && github.event_name != 'pull_request' }} + tags: ${{ env.ACT && format('{0}:local', env.IMAGE_NAME) || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | USER=ibtisam @@ -87,4 +89,5 @@ jobs: cache-to: type=gha,mode=max - name: Image digest + if: ${{ !env.ACT }} run: echo "Pushed ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" diff --git a/.github/workflows/build-jenkins-rootfs.yml b/.github/workflows/build-jenkins-rootfs.yml index 0504735..94a7b54 100644 --- a/.github/workflows/build-jenkins-rootfs.yml +++ b/.github/workflows/build-jenkins-rootfs.yml @@ -40,6 +40,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GHCR + if: ${{ !env.ACT }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -47,6 +48,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata + if: ${{ !env.ACT }} id: meta uses: docker/metadata-action@v5 with: @@ -73,9 +75,9 @@ jobs: context: ./iximiuz/rootfs/jenkins file: ./iximiuz/rootfs/jenkins/Dockerfile platforms: linux/amd64 - load: false - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + load: ${{ !!env.ACT }} + push: ${{ !env.ACT && github.event_name != 'pull_request' }} + tags: ${{ env.ACT && format('{0}:local', env.IMAGE_NAME) || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | USER=ibtisam @@ -84,4 +86,5 @@ jobs: cache-to: type=gha,mode=max - name: Image digest + if: ${{ !env.ACT }} run: echo "Pushed ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" diff --git a/.github/workflows/build-nexus-rootfs.yml b/.github/workflows/build-nexus-rootfs.yml index c723091..fbd55ea 100644 --- a/.github/workflows/build-nexus-rootfs.yml +++ b/.github/workflows/build-nexus-rootfs.yml @@ -40,6 +40,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GHCR + if: ${{ !env.ACT }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -47,6 +48,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata + if: ${{ !env.ACT }} id: meta uses: docker/metadata-action@v5 with: @@ -73,9 +75,9 @@ jobs: context: ./iximiuz/rootfs/nexus file: ./iximiuz/rootfs/nexus/Dockerfile platforms: linux/amd64 - load: false - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + load: ${{ !!env.ACT }} + push: ${{ !env.ACT && github.event_name != 'pull_request' }} + tags: ${{ env.ACT && format('{0}:local', env.IMAGE_NAME) || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | USER=ibtisam @@ -84,4 +86,5 @@ jobs: cache-to: type=gha,mode=max - name: Image digest + if: ${{ !env.ACT }} run: echo "Pushed ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" diff --git a/.github/workflows/build-sonarqube-rootfs.yml b/.github/workflows/build-sonarqube-rootfs.yml index b0f0cfb..d33bafc 100644 --- a/.github/workflows/build-sonarqube-rootfs.yml +++ b/.github/workflows/build-sonarqube-rootfs.yml @@ -40,6 +40,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GHCR + if: ${{ !env.ACT }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -47,6 +48,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata + if: ${{ !env.ACT }} id: meta uses: docker/metadata-action@v5 with: @@ -73,9 +75,9 @@ jobs: context: ./iximiuz/rootfs/sonarqube file: ./iximiuz/rootfs/sonarqube/Dockerfile platforms: linux/amd64 - load: false - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + load: ${{ !!env.ACT }} + push: ${{ !env.ACT && github.event_name != 'pull_request' }} + tags: ${{ env.ACT && format('{0}:local', env.IMAGE_NAME) || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | USER=ibtisam @@ -84,4 +86,5 @@ jobs: cache-to: type=gha,mode=max - name: Image digest + if: ${{ !env.ACT }} run: echo "Pushed ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" diff --git a/.github/workflows/build-ubuntu-rootfs.yml b/.github/workflows/build-ubuntu-rootfs.yml index 3d01bd3..b749d1d 100644 --- a/.github/workflows/build-ubuntu-rootfs.yml +++ b/.github/workflows/build-ubuntu-rootfs.yml @@ -40,6 +40,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GHCR + if: ${{ !env.ACT }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -47,6 +48,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata + if: ${{ !env.ACT }} id: meta uses: docker/metadata-action@v5 with: @@ -71,9 +73,9 @@ jobs: context: ./iximiuz/rootfs/ubuntu file: ./iximiuz/rootfs/ubuntu/Dockerfile platforms: linux/amd64,linux/arm64 - load: false - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + load: ${{ !!env.ACT }} + push: ${{ !env.ACT && github.event_name != 'pull_request' }} + tags: ${{ env.ACT && format('{0}:local', env.IMAGE_NAME) || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | USER=ibtisam @@ -85,4 +87,5 @@ jobs: cache-to: type=gha,mode=max - name: Image digest + if: ${{ !env.ACT }} run: echo "Pushed ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" From 699148fd04cb120c1904b31bca58bad3975dad9f Mon Sep 17 00:00:00 2001 From: Muhammad Ibtisam <174851199+ibtisam-iq@users.noreply.github.com> Date: Mon, 8 Jun 2026 20:26:10 +0500 Subject: [PATCH 2/2] docs: add Local CI Workflow Testing with act section to all build READMEs --- iximiuz/rootfs/guacamole/README.md | 26 ++++++++++++++++++++++++++ iximiuz/rootfs/jenkins/README.md | 21 ++++++++++++++++++++- iximiuz/rootfs/nexus/README.md | 20 ++++++++++++++++++++ iximiuz/rootfs/sonarqube/README.md | 20 ++++++++++++++++++++ iximiuz/rootfs/ubuntu/README.md | 20 ++++++++++++++++++++ 5 files changed, 106 insertions(+), 1 deletion(-) diff --git a/iximiuz/rootfs/guacamole/README.md b/iximiuz/rootfs/guacamole/README.md index b1a057a..2fc0ef9 100644 --- a/iximiuz/rootfs/guacamole/README.md +++ b/iximiuz/rootfs/guacamole/README.md @@ -130,6 +130,32 @@ docker build \ . ``` +## Local CI Workflow Testing with `act` + +The full CI workflow can be run locally using [`act`](https://github.com/nektos/act) — this builds the image through the same pipeline steps that run on GitHub Actions, without pushing to GHCR and without any secrets. From the root of the `silver-stack` repository: + +```bash +act push \ + -W .github/workflows/build-guacamole-rootfs.yml \ + --no-cache-server +``` + +The image builds and loads into the local Docker daemon. No GITHUB_TOKEN or GHCR credentials are required. + +### Verify the Built Image + +```bash +docker images | grep guacamole-rootfs +``` + +## Published Image + +The image is built and pushed to GHCR automatically via GitHub Actions on every push to `main`. No manual push is involved. + +```bash +docker pull ghcr.io/ibtisam-iq/guacamole-rootfs:latest +``` + ## Usage in an iximiuz Playground ```bash diff --git a/iximiuz/rootfs/jenkins/README.md b/iximiuz/rootfs/jenkins/README.md index 597f2ef..2d09d81 100644 --- a/iximiuz/rootfs/jenkins/README.md +++ b/iximiuz/rootfs/jenkins/README.md @@ -124,8 +124,28 @@ docker build \ . ``` +## Local CI Workflow Testing with `act` + +The full CI workflow can be run locally using [`act`](https://github.com/nektos/act) — this builds the image through the same pipeline steps that run on GitHub Actions, without pushing to GHCR and without any secrets. From the root of the `silver-stack` repository: + +```bash +act push \ + -W .github/workflows/build-jenkins-rootfs.yml \ + --no-cache-server +``` + +The image builds and loads into the local Docker daemon. No GITHUB_TOKEN or GHCR credentials are required. + +### Verify the Built Image + +```bash +docker images | grep jenkins-rootfs +``` + ## Published Image +The image is built and pushed to GHCR automatically via GitHub Actions on every push to `main`. No manual push is involved. + ```bash docker pull ghcr.io/ibtisam-iq/jenkins-rootfs:latest ``` @@ -189,4 +209,3 @@ Post-boot (manual, user-initiated): Full setup docs and source references, see my runbook: https://runbook.ibtisam-iq.com/containers/iximiuz/rootfs/setup-jenkins-rootfs-image - diff --git a/iximiuz/rootfs/nexus/README.md b/iximiuz/rootfs/nexus/README.md index 2464941..38feed7 100644 --- a/iximiuz/rootfs/nexus/README.md +++ b/iximiuz/rootfs/nexus/README.md @@ -76,8 +76,28 @@ docker build \ . ``` +## Local CI Workflow Testing with `act` + +The full CI workflow can be run locally using [`act`](https://github.com/nektos/act) — this builds the image through the same pipeline steps that run on GitHub Actions, without pushing to GHCR and without any secrets. From the root of the `silver-stack` repository: + +```bash +act push \ + -W .github/workflows/build-nexus-rootfs.yml \ + --no-cache-server +``` + +The image builds and loads into the local Docker daemon. No GITHUB_TOKEN or GHCR credentials are required. + +### Verify the Built Image + +```bash +docker images | grep nexus-rootfs +``` + ## Published Image +The image is built and pushed to GHCR automatically via GitHub Actions on every push to `main`. No manual push is involved. + ```bash docker pull ghcr.io/ibtisam-iq/nexus-rootfs:latest ``` diff --git a/iximiuz/rootfs/sonarqube/README.md b/iximiuz/rootfs/sonarqube/README.md index 490e898..4c64f04 100644 --- a/iximiuz/rootfs/sonarqube/README.md +++ b/iximiuz/rootfs/sonarqube/README.md @@ -91,8 +91,28 @@ docker build \ . ``` +## Local CI Workflow Testing with `act` + +The full CI workflow can be run locally using [`act`](https://github.com/nektos/act) — this builds the image through the same pipeline steps that run on GitHub Actions, without pushing to GHCR and without any secrets. From the root of the `silver-stack` repository: + +```bash +act push \ + -W .github/workflows/build-sonarqube-rootfs.yml \ + --no-cache-server +``` + +The image builds and loads into the local Docker daemon. No GITHUB_TOKEN or GHCR credentials are required. + +### Verify the Built Image + +```bash +docker images | grep sonarqube-rootfs +``` + ## Published Image +The image is built and pushed to GHCR automatically via GitHub Actions on every push to `main`. No manual push is involved. + ```bash docker pull ghcr.io/ibtisam-iq/sonarqube-rootfs:latest ``` diff --git a/iximiuz/rootfs/ubuntu/README.md b/iximiuz/rootfs/ubuntu/README.md index 51899e6..56ade21 100644 --- a/iximiuz/rootfs/ubuntu/README.md +++ b/iximiuz/rootfs/ubuntu/README.md @@ -80,8 +80,28 @@ docker build \ . ``` +## Local CI Workflow Testing with `act` + +The full CI workflow can be run locally using [`act`](https://github.com/nektos/act) — this builds the image through the same pipeline steps that run on GitHub Actions, without pushing to GHCR and without any secrets. From the root of the `silver-stack` repository: + +```bash +act push \ + -W .github/workflows/build-ubuntu-rootfs.yml \ + --no-cache-server +``` + +The image builds and loads into the local Docker daemon. No GITHUB_TOKEN or GHCR credentials are required. + +### Verify the Built Image + +```bash +docker images | grep ubuntu-24-04-rootfs +``` + ## Published Image +The image is built and pushed to GHCR automatically via GitHub Actions on every push to `main`. No manual push is involved. + ``` docker pull ghcr.io/ibtisam-iq/ubuntu-24-04-rootfs:latest ```