Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions .github/workflows/update-and-build-ralphex-fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,11 @@ jobs:
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 Bun version (GNU sed syntax for Linux)
sed -i "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"
# Update Hugo version (GNU sed syntax for Linux)
sed -i "s/^ARG HUGO_VERSION=.*/ARG HUGO_VERSION=$INPUT_HUGO_VERSION/" "${{ env.DOCKERFILE_PATH }}"

# Verify changes
echo ""
Expand Down Expand Up @@ -98,12 +95,15 @@ jobs:

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

# Create commit message
git commit -m "chore(ralphex-fe): update versions to Bun ${BUN_VERSION}, Hugo ${HUGO_VERSION}
# Create commit message using heredoc for proper multi-line formatting
git commit -m "$(cat <<EOF
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>"
Co-Authored-By: ${GITHUB_ACTOR} <${ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com>
EOF
)"

git push

Expand Down
36 changes: 36 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@ This document defines patterns, conventions, and guidelines for AI agents workin

This repository contains Dockerfiles for custom devcontainer images hosted on GitHub Container Registry (ghcr.io). Each image is designed for VS Code Dev Containers with specific development environments.

## AI Agent Best Practices

### Always Verify with Official Documentation

When implementing features or making changes, **ALWAYS** check the latest official documentation:

- **GitHub Actions**: https://docs.github.com/en/actions
- Runs on Ubuntu (GNU/Linux) - use GNU coreutils syntax, NOT macOS/BSD syntax
- Example: `sed -i "pattern" file` (GNU) NOT `sed -i.bak "pattern" file` (BSD)
- Check platform-specific tool behavior (sed, grep, awk, etc.)
- Verify workflow syntax with official examples

- **Docker/Dockerfile**: https://docs.docker.com/reference/dockerfile/
- Multi-platform builds use `TARGETARCH` (amd64, arm64)
- Verify base image availability and compatibility

- **Tools and Dependencies**:
- Bun: https://bun.sh/docs
- Hugo: https://gohugo.io/documentation/
- GitHub CLI: https://cli.github.com/manual/
- Always verify command syntax from official docs, not assumptions

### Platform Awareness

- **GitHub Actions runners**: Ubuntu Linux (use GNU tools)
- **Docker builds**: Multi-platform (linux/amd64, linux/arm64)
- **Base images**: Check Alpine vs Debian (apk vs apt, musl vs glibc)
- **Scripts**: Test for portability (sh vs bash, GNU vs BSD tools)

### Validation Before Committing

- YAML syntax validation for workflows
- Dockerfile syntax validation
- Test on target platform (not just local macOS/Windows)
- Verify assumptions about available tools and their versions

## Directory Structure

```
Expand Down