Skip to main content
The Apps Image repository uses act to run GitHub Actions workflows locally. This allows you to test version checking and image building before pushing changes.

Prerequisites

Install act on your system:
brew install act

Testing Version Checking

The check-version.yaml workflow validates version tracking configuration and checks for updates.

Check Single Application

Test version checking for a specific application:
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=apps/icones
This will:
  1. Read the application’s meta.json
  2. Check the configured repository for version updates
  3. Display current and available versions
  4. Show whether an update is needed

Check Multiple Applications

Test several applications at once:
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=apps/icones,apps/rayso,base/nginx
Separate multiple contexts with commas (no spaces).

Check All Applications

Run version checks across the entire repository:
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=all
Checking all applications may take several minutes depending on the number of apps and API rate limits.

Check Base Images

Test base image version tracking:
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=base/nginx

Testing Image Builds

The build-test.yaml workflow allows you to test Docker image building locally.

Dry Run (Metadata Only)

View Docker metadata without actually building the image:
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/icones \
  --input build=false \
  --input notify=false
This shows:
  • Docker image names
  • Tags that will be generated
  • Platforms that will be built
  • Build arguments and placeholders
Dry runs are fast and don’t require Docker. Use them to validate configuration before building.

Full Build Test

Build the Docker image locally:
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/icones
This will:
  1. Run pre-build scripts (if any)
  2. Build the Docker image
  3. Tag the image locally
  4. Show build logs and results
By default, build=true and notify=false when using the test workflow.

Test Specific Variants

Build only specific variants:
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=base/nginx \
  --input build=false \
  --input notify=false \
  --input variants=latest,vue
Omit the variants input to test all variants.

Real-World Testing Examples

Test New Application

When adding a new application, test it thoroughly:
1
Check version tracking works
2
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=apps/your-app
3
Verify it detects the correct version from the upstream repository.
4
Validate Docker metadata
5
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/your-app \
  --input build=false \
  --input notify=false
6
Check that tags and platforms are correct.
7
Test pre-build script
8
If you have a pre.sh script:
9
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/your-app \
  --input notify=false
10
Watch the pre.sh script execution and verify it completes successfully.
11
Verify final image
12
After successful build, test the image:
13
docker run -p 3000:3000 aliuq/your-app:latest

Test Multi-Variant Configuration

For applications with multiple variants (like cobalt or nginx):
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=base/nginx \
  --input build=false \
  --input notify=false

Test Version Tracking Types

Different version tracking strategies:
# Test version tracking from package.json
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=apps/weektodo
Should show the version from package.json in the repository.

Workflow Input Parameters

check-version.yaml Inputs

InputRequiredDefaultDescription
debugNofalseEnable debug output
contextYes-Application path(s) or “all”

build-test.yaml Inputs

InputRequiredDefaultDescription
debugNofalseEnable debug output
contextYes-Application path (e.g., “apps/icones”)
buildNotrueActually build the image
notifyNofalseSend notifications
variantsNo(all)Comma-separated variant names

Understanding Output

Version Check Output

✓ Checking apps/icones
  Current version: 0bc5918
  Latest version: 0bc5918
  Status: Up to date
or
✓ Checking apps/weektodo
  Current version: 2.2.0
  Latest version: 2.3.0
  Status: Update available

Build Output

✓ Running pre-build script: pre.sh
+ VERSION=73fac26
+ mkdir -p app
+ cd app
...

✓ Building Docker image
  Image: aliuq/rayso
  Tags: latest, 73fac26
  Platforms: linux/amd64, linux/arm64
...

✓ Build successful

Debugging Build Failures

Pre-build Script Failures

If the pre.sh script fails:
  1. Check the script output for the specific error
  2. Verify version placeholders are correct
  3. Test the script manually:
cd apps/your-app
bash -x pre.sh
The -x flag shows each command as it executes.

Docker Build Failures

If the Docker build fails:
  1. Check Dockerfile syntax
  2. Verify version ARG is correct:
ARG VERSION=placeholder
  1. Test the Dockerfile directly:
docker build -t test --build-arg VERSION=1.0.0 apps/your-app

Version Detection Failures

If version checking fails:
  1. Verify the repository URL is correct
  2. Check the file path for version tracking:
{
  "checkver": {
    "type": "version",
    "repo": "https://github.com/owner/repo",
    "file": "package.json"  // Verify this exists
  }
}
  1. For monorepos, specify the path:
{
  "checkver": {
    "type": "version",
    "repo": "https://github.com/owner/repo",
    "file": "web/package.json",  // Subdirectory path
    "path": "web"  // For SHA tracking
  }
}

Common Testing Workflows

Before Committing

Always test before pushing changes:
# 1. Check version tracking
act workflow_dispatch -W .github/workflows/check-version.yaml \
  --input debug=true \
  --input context=apps/your-app

# 2. Validate Docker metadata
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/your-app \
  --input build=false \
  --input notify=false

# 3. Test full build
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/your-app

# 4. Test the image
docker run -p 3000:3000 aliuq/your-app:latest

Testing Configuration Changes

When updating meta.json:
# Test metadata generation
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/your-app \
  --input build=false \
  --input notify=false
Review the output to verify:
  • Image names are correct
  • Tags are generated as expected
  • Platforms are appropriate
  • Placeholders are replaced properly

Testing Base Image Updates

When updating a base image:
# 1. Build the base image
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=base/nginx

# 2. Test an app that uses it
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input debug=true \
  --input context=apps/icones

Performance Tips

Use Dry Runs First

Always validate metadata before building:
# Fast: 1-2 seconds
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input context=apps/icones \
  --input build=false \
  --input notify=false

# Slow: 5-30 minutes
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input context=apps/icones

Test Specific Variants

Don’t build all variants if you only changed one:
# Only test the dev variant
act workflow_dispatch -W .github/workflows/build-test.yaml \
  --input context=apps/cobalt \
  --input variants=dev

Use Docker BuildKit

Enable BuildKit for faster builds:
export DOCKER_BUILDKIT=1
Or add to your shell configuration:
echo 'export DOCKER_BUILDKIT=1' >> ~/.bashrc
BuildKit provides better caching, parallel builds, and more efficient layer management.

Troubleshooting

act Not Found

If act command is not found:
# Check if installed
which act

# Install if missing (macOS)
brew install act

# Verify installation
act --version

Docker Daemon Not Running

If you get Docker connection errors:
# Start Docker Desktop (macOS/Windows)
# Or start Docker daemon (Linux)
sudo systemctl start docker

Workflow Not Found

If act can’t find the workflow:
# Make sure you're in the repository root
pwd

# List available workflows
ls .github/workflows/

# Use absolute path if needed
act workflow_dispatch -W $PWD/.github/workflows/check-version.yaml

Permission Denied

If you get permission errors:
# Add user to docker group (Linux)
sudo usermod -aG docker $USER

# Log out and back in for changes to take effect

Next Steps

Build docs developers (and LLMs) love