Repository navigation
Unify repo naming: drop devcontainer- prefix, publish under devcontai… #1
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 hugo-bun | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'hugo-bun/.devcontainer/Dockerfile' | |
| workflow_dispatch: | |
| concurrency: | |
| group: build-hugo-bun-${{ 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="hugo-bun/.devcontainer/Dockerfile" | |
| HUGO_VERSION=$(grep '^ARG HUGO_VERSION=' "$DOCKERFILE" | cut -d'=' -f2) | |
| BUN_VERSION=$(grep '^ARG BUN_VERSION=' "$DOCKERFILE" | cut -d'=' -f2) | |
| echo "version-tag=hugo${HUGO_VERSION}-bun${BUN_VERSION}-alpine" >> "$GITHUB_OUTPUT" | |
| echo "Hugo: $HUGO_VERSION, Bun: $BUN_VERSION" | |
| build: | |
| needs: prepare | |
| permissions: | |
| contents: read | |
| packages: write | |
| uses: ./.github/workflows/reusable-docker-build.yml | |
| with: | |
| image-name: devcontainers/hugo-bun | |
| context: hugo-bun/.devcontainer | |
| dockerfile: hugo-bun/.devcontainer/Dockerfile | |
| version-tag: ${{ needs.prepare.outputs.version-tag }} | |
| verify-command: 'bun --version && hugo version' | |
| secrets: inherit |