Skip to content

Adding a lot of new server files - probably some I shouldn't have... #1

Adding a lot of new server files - probably some I shouldn't have...

Adding a lot of new server files - probably some I shouldn't have... #1

Workflow file for this run

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 .