Repository navigation
Build ralphex-fe #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build ralphex-fe | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'ralphex-fe/Dockerfile' | |
| - 'ralphex-fe/*.sh' | |
| schedule: | |
| # Daily rebuild to bake in the latest ralphex and rtk releases, which the | |
| # Dockerfile pulls from GitHub "latest" at build time. Offset from | |
| # build-claude-code.yml's 11:13 to avoid hitting the GitHub API at the same minute. | |
| - cron: '41 11 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| concurrency: | |
| group: build-ralphex-fe-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version-tag: ${{ steps.versions.outputs.version-tag }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Extract versions from Dockerfile | |
| id: versions | |
| run: | | |
| DOCKERFILE="ralphex-fe/Dockerfile" | |
| BUN_VERSION=$(grep '^ARG BUN_VERSION=' "$DOCKERFILE" | cut -d'=' -f2) | |
| HUGO_VERSION=$(grep '^ARG HUGO_VERSION=' "$DOCKERFILE" | cut -d'=' -f2) | |
| if [ -z "$BUN_VERSION" ] || [ -z "$HUGO_VERSION" ]; then | |
| echo "Error: Failed to extract version(s) from Dockerfile" | |
| echo " Bun: ${BUN_VERSION:-<empty>}" | |
| echo " Hugo: ${HUGO_VERSION:-<empty>}" | |
| exit 1 | |
| fi | |
| echo "version-tag=bun${BUN_VERSION}-hugo${HUGO_VERSION}" >> "$GITHUB_OUTPUT" | |
| echo "Extracted versions:" | |
| echo " Bun: $BUN_VERSION" | |
| echo " Hugo: $HUGO_VERSION" | |
| build: | |
| needs: prepare | |
| uses: docker/github-builder/.github/workflows/build.yml@v1 | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| with: | |
| output: image | |
| push: true | |
| context: ralphex-fe | |
| platforms: linux/amd64,linux/arm64 | |
| meta-images: ghcr.io/gatezh/devcontainers/ralphex-fe | |
| meta-tags: | | |
| type=raw,value=latest | |
| type=raw,value=${{ needs.prepare.outputs.version-tag }} | |
| secrets: | |
| registry-auths: | | |
| - registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| verify: | |
| name: Verify (${{ matrix.arch }}) | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| arch: amd64 | |
| - runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Verify tools | |
| run: | | |
| docker pull ghcr.io/gatezh/devcontainers/ralphex-fe:latest | |
| docker run --rm --entrypoint sh ghcr.io/gatezh/devcontainers/ralphex-fe:latest -c " | |
| bun --version && | |
| hugo version && | |
| python3 --version && | |
| go version && | |
| node --version && | |
| /srv/ralphex --version && | |
| claude --version && | |
| id app && | |
| test -f /init.sh && | |
| test -f /srv/init.sh && | |
| chromium --no-sandbox --version && | |
| test -x /usr/bin/chromium && | |
| echo 'All checks passed' | |
| " |