docs(website): move Essential Primer before Language Guide #205
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
| # ============================================================================= | |
| # ARO Docker Images - Multi-Platform Build Pipeline | |
| # ============================================================================= | |
| # Builds and publishes aro-buildsystem and aro-runtime Docker images | |
| # to GitHub Container Registry (ghcr.io) | |
| # ============================================================================= | |
| name: Docker | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'docker/**' | |
| - '.github/workflows/docker.yml' | |
| env: | |
| REGISTRY: ghcr.io | |
| BUILDSYSTEM_IMAGE: ghcr.io/arolang/aro-buildsystem | |
| RUNTIME_IMAGE: ghcr.io/arolang/aro-runtime | |
| jobs: | |
| # =========================================================================== | |
| # Build and Push Docker Images | |
| # =========================================================================== | |
| build-images: | |
| name: Build Docker Images | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - 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 GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata for buildsystem | |
| id: meta-buildsystem | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.BUILDSYSTEM_IMAGE }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=sha,prefix= | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Extract metadata for runtime | |
| id: meta-runtime | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.RUNTIME_IMAGE }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=sha,prefix= | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| # Build runtime image first (simpler, no ARO build required) | |
| - name: Build and push runtime image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./docker/runtime | |
| file: ./docker/runtime/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta-runtime.outputs.tags }} | |
| labels: ${{ steps.meta-runtime.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # Build buildsystem image (includes ARO CLI) | |
| - name: Build and push buildsystem image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./docker/buildsystem | |
| file: ./docker/buildsystem/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta-buildsystem.outputs.tags }} | |
| labels: ${{ steps.meta-buildsystem.outputs.labels }} | |
| build-args: | | |
| ARO_VERSION=${{ github.ref_name }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # =========================================================================== | |
| # Test Docker Images | |
| # =========================================================================== | |
| test-images: | |
| name: Test Docker Images | |
| needs: build-images | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Test buildsystem image | |
| run: | | |
| docker run --rm ${{ env.BUILDSYSTEM_IMAGE }}:latest --version | |
| docker run --rm -v ${{ github.workspace }}/Examples/HelloWorld:/app ${{ env.BUILDSYSTEM_IMAGE }}:latest check . | |
| - name: Test runtime image | |
| run: | | |
| # Build a test binary using buildsystem | |
| docker run --rm -v ${{ github.workspace }}/Examples/HelloWorld:/app ${{ env.BUILDSYSTEM_IMAGE }}:latest build . -o hello | |
| # Run it using runtime image | |
| docker run --rm -v ${{ github.workspace }}/Examples/HelloWorld:/app ${{ env.RUNTIME_IMAGE }}:latest /app/hello || echo "Binary execution test (may require interactive terminal)" |