Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
939582e
feat: create ralphex-bun Dockerfile with Bun and Hugo
gatezh Feb 3, 2026
fcfb586
feat: add README documentation for ralphex-bun image
gatezh Feb 3, 2026
e06d1c1
feat: add GitHub Actions workflow for ralphex-bun image
gatezh Feb 3, 2026
370b3f7
feat: add ralphex-bun to main README documentation
gatezh Feb 3, 2026
b306c8c
feat: verify ralphex-bun Dockerfile and workflow syntax
gatezh Feb 3, 2026
8e3cafb
feat: complete ralphex-bun plan and move to completed directory
gatezh Feb 3, 2026
3e3d896
fix: address code review findings
gatezh Feb 3, 2026
39f4555
fix: address code review findings
gatezh Feb 3, 2026
97de120
fix: address code review findings
gatezh Feb 3, 2026
1e6e153
fix: address code review findings
gatezh Feb 3, 2026
c5df51f
fix: address code review findings
gatezh Feb 3, 2026
f32952a
fix: address code review findings
gatezh Feb 3, 2026
a6927c7
fix: address codex review findings
gatezh Feb 3, 2026
f14e83c
feat: rename ralphex-bun to ralphex-fe (directory and workflow file)
gatezh Feb 4, 2026
ff9d019
feat: update Dockerfile labels from ralphex-bun to ralphex-fe
gatezh Feb 4, 2026
9846d3a
feat: update ralphex-fe README with new image name
gatezh Feb 4, 2026
c881269
feat: update GitHub Actions workflow references from ralphex-bun to r…
gatezh Feb 4, 2026
af6102a
feat: update root README.md with ralphex-fe references
gatezh Feb 4, 2026
cc3905c
feat: verify ralphex-bun to ralphex-fe rename completion
gatezh Feb 4, 2026
cfe0d83
feat: move rename plan to completed directory
gatezh Feb 4, 2026
128b189
fix: address code review findings
gatezh Feb 4, 2026
d026362
fix: address codex review findings
gatezh Feb 4, 2026
0597513
fix: address code review findings
gatezh Feb 4, 2026
0c51180
feat: add manual version update workflow with gh CLI docs and skip do…
gatezh Feb 8, 2026
1f7d404
Merge branch 'master' into ralphex-image
gatezh Feb 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-ralphex-fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
jobs:
build-and-push:
runs-on: ubuntu-latest
# Skip if commit was made by the update workflow to avoid double builds
if: ${{ !contains(github.event.head_commit.message, 'via GitHub Actions workflow dispatch') }}

permissions:
contents: read
Expand Down
221 changes: 221 additions & 0 deletions .github/workflows/update-and-build-ralphex-fe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
name: Update and Build ralphex-fe

on:
workflow_dispatch:
inputs:
bun_version:
description: 'New Bun version to set in Dockerfile (e.g., 1.4.0)'
required: true
type: string
hugo_version:
description: 'New Hugo version to set in Dockerfile (e.g., 0.156.0)'
required: true
type: string
update_only:
description: 'Only update Dockerfile without building image'
required: false
default: false
type: boolean

env:
REGISTRY: ghcr.io
IMAGE_NAME: ralphex-fe
DOCKERFILE_PATH: ralphex-fe/Dockerfile

jobs:
update-dockerfile:
runs-on: ubuntu-latest

permissions:
contents: write

outputs:
versions_updated: ${{ steps.update.outputs.updated }}
bun_version: ${{ steps.update.outputs.bun_version }}
hugo_version: ${{ steps.update.outputs.hugo_version }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update Dockerfile versions
id: update
env:
INPUT_BUN_VERSION: ${{ inputs.bun_version }}
INPUT_HUGO_VERSION: ${{ inputs.hugo_version }}
run: |
# Read current versions
CURRENT_BUN=$(grep '^ARG BUN_VERSION=' "${{ env.DOCKERFILE_PATH }}" | cut -d'=' -f2)
CURRENT_HUGO=$(grep '^ARG HUGO_VERSION=' "${{ env.DOCKERFILE_PATH }}" | cut -d'=' -f2)

echo "Current versions:"
echo " Bun: $CURRENT_BUN"
echo " Hugo: $CURRENT_HUGO"
echo ""
echo "Requested versions:"
echo " Bun: $INPUT_BUN_VERSION"
echo " Hugo: $INPUT_HUGO_VERSION"

# Update Bun version
sed -i.bak "s/^ARG BUN_VERSION=.*/ARG BUN_VERSION=$INPUT_BUN_VERSION/" "${{ env.DOCKERFILE_PATH }}"

# Update Hugo version
sed -i.bak "s/^ARG HUGO_VERSION=.*/ARG HUGO_VERSION=$INPUT_HUGO_VERSION/" "${{ env.DOCKERFILE_PATH }}"

# Clean up backup file
rm -f "${{ env.DOCKERFILE_PATH }}.bak"

# Verify changes
echo ""
echo "Updated versions in Dockerfile:"
grep '^ARG BUN_VERSION=' "${{ env.DOCKERFILE_PATH }}"
grep '^ARG HUGO_VERSION=' "${{ env.DOCKERFILE_PATH }}"

# Check if anything changed
if git diff --quiet "${{ env.DOCKERFILE_PATH }}"; then
echo "No changes detected - versions are already up to date"
echo "updated=false" >> $GITHUB_OUTPUT
else
echo "Changes detected - versions updated"
echo "updated=true" >> $GITHUB_OUTPUT
fi

echo "bun_version=$INPUT_BUN_VERSION" >> $GITHUB_OUTPUT
echo "hugo_version=$INPUT_HUGO_VERSION" >> $GITHUB_OUTPUT

- name: Commit and push changes
if: steps.update.outputs.updated == 'true'
env:
BUN_VERSION: ${{ steps.update.outputs.bun_version }}
HUGO_VERSION: ${{ steps.update.outputs.hugo_version }}
GITHUB_ACTOR: ${{ github.actor }}
ACTOR_ID: ${{ github.actor_id }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git add "${{ env.DOCKERFILE_PATH }}"

# Create commit message
git commit -m "chore(ralphex-fe): update versions to Bun ${BUN_VERSION}, Hugo ${HUGO_VERSION}

Updated via GitHub Actions workflow dispatch.

Co-Authored-By: ${GITHUB_ACTOR} <${ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com>"

git push

echo "✅ Dockerfile updated and pushed to repository"

- name: No changes needed
if: steps.update.outputs.updated == 'false'
run: |
echo "ℹ️ Dockerfile already has the requested versions - no update needed"

build-and-push:
needs: update-dockerfile
if: ${{ needs.update-dockerfile.outputs.versions_updated == 'true' && inputs.update_only == false }}
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

# Pull latest changes since we just pushed
- name: Pull latest changes
run: git pull

- name: Extract versions from updated Dockerfile
id: versions
run: |
BUN_VERSION=$(grep '^ARG BUN_VERSION=' "${{ env.DOCKERFILE_PATH }}" | cut -d'=' -f2)
HUGO_VERSION=$(grep '^ARG HUGO_VERSION=' "${{ env.DOCKERFILE_PATH }}" | cut -d'=' -f2)

echo "bun=$BUN_VERSION" >> $GITHUB_OUTPUT
echo "hugo=$HUGO_VERSION" >> $GITHUB_OUTPUT

echo "Building with versions:"
echo " Bun: $BUN_VERSION"
echo " Hugo: $HUGO_VERSION"

- name: Generate image tags
id: tags
env:
BUN_VERSION: ${{ steps.versions.outputs.bun }}
HUGO_VERSION: ${{ steps.versions.outputs.hugo }}
run: |
NAMESPACE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
BASE_IMAGE="${{ env.REGISTRY }}/${NAMESPACE}/${{ env.IMAGE_NAME }}"

VERSION_TAG="bun${BUN_VERSION}-hugo${HUGO_VERSION}-ralphex"

TAGS="${BASE_IMAGE}:latest,${BASE_IMAGE}:${VERSION_TAG}"

echo "namespace=$NAMESPACE" >> $GITHUB_OUTPUT
echo "tags=$TAGS" >> $GITHUB_OUTPUT
echo "Generated tags:"
echo "$TAGS" | tr ',' '\n'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ steps.tags.outputs.namespace }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ralphex-fe
file: ${{ env.DOCKERFILE_PATH }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.tags.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Verify image
env:
TAGS: ${{ steps.tags.outputs.tags }}
run: |
FIRST_TAG=$(echo "$TAGS" | cut -d',' -f1)

echo "Verifying multiplatform image: $FIRST_TAG"
docker pull --platform linux/amd64 "$FIRST_TAG"
docker pull --platform linux/arm64 "$FIRST_TAG"

echo "Verifying Bun installation (amd64)..."
docker run --rm --platform linux/amd64 "$FIRST_TAG" bun --version

echo "Verifying Hugo installation (amd64)..."
docker run --rm --platform linux/amd64 "$FIRST_TAG" hugo version

echo "Verifying Bun installation (arm64)..."
docker run --rm --platform linux/arm64 "$FIRST_TAG" bun --version

echo "Verifying Hugo installation (arm64)..."
docker run --rm --platform linux/arm64 "$FIRST_TAG" hugo version

echo "✅ Multiplatform image successfully built and pushed!"
echo "Tags: $TAGS"
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,51 @@ docker run --rm -v $(pwd):/workspace -w /workspace -p 1313:1313 ghcr.io/<usernam
## Building and Publishing

Images from this repository are built and published to GitHub Container Registry. Other projects can reference these images in their `devcontainer.json` files using the `"image"` property.

## Updating Image Versions

### Via GitHub UI

Some images have automated update workflows that allow you to update dependency versions without manually editing Dockerfiles:

1. Go to **Actions** tab → Select the update workflow (e.g., "Update and Build ralphex-fe")
2. Click **Run workflow**
3. Enter new versions (e.g., Bun 1.4.0, Hugo 0.156.0)
4. Click **Run workflow** button

The workflow will:
- Update the Dockerfile with new versions
- Commit the changes to the repository
- Build and push the updated image

### Via GitHub CLI

If you have the [GitHub CLI](https://cli.github.com/) installed, you can trigger updates from your terminal:

```bash
# Update ralphex-fe image versions
gh workflow run update-and-build-ralphex-fe.yml \
-f bun_version=1.4.0 \
-f hugo_version=0.156.0

# Update without building (just commit to repo)
gh workflow run update-and-build-ralphex-fe.yml \
-f bun_version=1.4.0 \
-f hugo_version=0.156.0 \
-f update_only=true

# Check workflow status
gh run list --workflow=update-and-build-ralphex-fe.yml

# Watch the latest run in real-time
gh run watch
```

**Install GitHub CLI:**
```bash
# macOS
brew install gh

# Authenticate (one-time setup)
gh auth login
```