Changed practice to be horizontal instead of vertical in new nav pane… #3
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 and Publish Docker Image on Tag | |
| on: | |
| push: | |
| branches: | |
| - 'development' | |
| tags-ignore: | |
| - '**' # ignore all tags | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| packages: write | |
| steps: | |
| # Step 1: Set up Docker Buildx (supports layer caching) | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| # Step 2: Restore cache for Docker layers | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: buildx-cache-${{ github.sha }} | |
| restore-keys: | | |
| buildx-cache-${{ github.sha }} | |
| buildx-cache- | |
| buildx | |
| # Step 3: Check out the repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # # Step 4: Log in to registry | |
| - name: Log into registry | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Initialize cache directory | |
| run: mkdir -p /tmp/.buildx-cache | |
| - name: Debug cache | |
| run: ls -l /tmp/.buildx-cache | |
| # Step 5: Build and push the Docker image with caching | |
| - name: Build and Push Docker image | |
| run: | | |
| docker buildx build \ | |
| --cache-from=type=local,src=/tmp/.buildx-cache \ | |
| --cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \ | |
| --tag ghcr.io/ximeraproject/ximeraserver:latest \ | |
| --push . |