Repository navigation
Merge pull request #26 from gatezh/super-devcontainer #7
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' | ||
| workflow_dispatch: | ||
| 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@v4 | ||
| - 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) | ||
| RALPHEX_VERSION=$(grep '^ARG RALPHEX_VERSION=' "$DOCKERFILE" | cut -d'=' -f2) | ||
| if [ -z "$BUN_VERSION" ] || [ -z "$HUGO_VERSION" ] || [ -z "$RALPHEX_VERSION" ]; then | ||
| echo "Error: Failed to extract version(s) from Dockerfile" | ||
| echo " Bun: ${BUN_VERSION:-<empty>}" | ||
| echo " Hugo: ${HUGO_VERSION:-<empty>}" | ||
| echo " Ralphex: ${RALPHEX_VERSION:-<empty>}" | ||
| exit 1 | ||
| fi | ||
| echo "version-tag=bun${BUN_VERSION}-hugo${HUGO_VERSION}-ralphex${RALPHEX_VERSION}" >> "$GITHUB_OUTPUT" | ||
| echo "Extracted versions:" | ||
| echo " Bun: $BUN_VERSION" | ||
| echo " Hugo: $HUGO_VERSION" | ||
| echo " Ralphex: $RALPHEX_VERSION" | ||
| build: | ||
|
Check failure on line 48 in .github/workflows/build-ralphex-fe.yml
|
||
| needs: prepare | ||
| uses: ./.github/workflows/reusable-docker-build.yml | ||
| with: | ||
| image-name: ralphex-fe | ||
| context: ralphex-fe | ||
| dockerfile: ralphex-fe/Dockerfile | ||
| version-tag: ${{ needs.prepare.outputs.version-tag }} | ||
| verify-command: 'bun --version && hugo version' | ||
| extra-verify-script: | | ||
| chromium-browser --no-sandbox --version && \ | ||
| test "$PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH" = "/usr/bin/chromium-browser" && \ | ||
| echo "OK: PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH is correct" || \ | ||
| (echo "FAIL: expected /usr/bin/chromium-browser, got $PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH" && exit 1) && \ | ||
| test -x "$PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH" && \ | ||
| echo "OK: binary is executable at $PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH" || \ | ||
| (echo "FAIL: binary not executable at $PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH" && exit 1) && \ | ||
| test "$PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD" = "1" && \ | ||
| echo "OK: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1" || \ | ||
| (echo "FAIL: got PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=$PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD" && exit 1) && \ | ||
| ls /usr/share/fonts/freefont/FreeSans.ttf && \ | ||
| echo "OK: freefont found" || \ | ||
| (echo "FAIL: freefont not found" && exit 1) | ||
| secrets: inherit | ||