summary refs log tree commit diff
diff options
context:
space:
mode:
authorCyberL1 <mateusz.hf18@gmail.com>2026-02-10 10:22:28 +0100
committerCyberL1 <mateusz.hf18@gmail.com>2026-02-10 10:22:28 +0100
commit92c9df6b34a36bb1e5dcf35bc3e47654737a5cd1 (patch)
tree1ec6d82bb5858f8f3072a2ac72dce98516e65735
parentdont send channel create for dms that were already open??? (diff)
downloadserver-ts-92c9df6b34a36bb1e5dcf35bc3e47654737a5cd1.tar.xz
feat: docker image build workflows
-rw-r--r--.github/workflows/build-docker-admin-api.yml36
-rw-r--r--.github/workflows/build-docker-api.yml38
-rw-r--r--.github/workflows/build-docker-bundle.yml36
-rw-r--r--.github/workflows/build-docker-cdn-cs.yml36
-rw-r--r--.github/workflows/build-docker-cdn.yml38
-rw-r--r--.github/workflows/build-docker-gateway-offload.yml36
-rw-r--r--.github/workflows/build-docker-gateway.yml38
7 files changed, 258 insertions, 0 deletions
diff --git a/.github/workflows/build-docker-admin-api.yml b/.github/workflows/build-docker-admin-api.yml
new file mode 100644

index 00000000..955e29cf --- /dev/null +++ b/.github/workflows/build-docker-admin-api.yml
@@ -0,0 +1,36 @@ +name: Build admin api docker image + +on: + push: + branches: + - master + paths: + - "extra/admin-api/Spacebar.AdminApi/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.admin-api + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts-admin-api --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO-admin-api + docker push ghcr.io/$REPO-admin-api diff --git a/.github/workflows/build-docker-api.yml b/.github/workflows/build-docker-api.yml new file mode 100644
index 00000000..9f971419 --- /dev/null +++ b/.github/workflows/build-docker-api.yml
@@ -0,0 +1,38 @@ +name: Build api docker image + +on: + push: + branches: + - master + paths: + - "src/api/**" + - "src/schemas/**" + - "src/util/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.api + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts-api --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO-api + docker push ghcr.io/$REPO-api diff --git a/.github/workflows/build-docker-bundle.yml b/.github/workflows/build-docker-bundle.yml new file mode 100644
index 00000000..b102ab4e --- /dev/null +++ b/.github/workflows/build-docker-bundle.yml
@@ -0,0 +1,36 @@ +name: Build bundle docker image + +on: + push: + branches: + - master + paths: + - "src/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.default + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO + docker push ghcr.io/$REPO diff --git a/.github/workflows/build-docker-cdn-cs.yml b/.github/workflows/build-docker-cdn-cs.yml new file mode 100644
index 00000000..18e2a1af --- /dev/null +++ b/.github/workflows/build-docker-cdn-cs.yml
@@ -0,0 +1,36 @@ +name: Build cdn cs docker image + +on: + push: + branches: + - master + paths: + - "extra/admin-api/Spacebar.Cdn/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.cdn-cs + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts-cdn-cs --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO-cdn-cs + docker push ghcr.io/$REPO-cdn-cs diff --git a/.github/workflows/build-docker-cdn.yml b/.github/workflows/build-docker-cdn.yml new file mode 100644
index 00000000..c79d9a37 --- /dev/null +++ b/.github/workflows/build-docker-cdn.yml
@@ -0,0 +1,38 @@ +name: Build cdn docker image + +on: + push: + branches: + - master + paths: + - "src/cdn/**" + - "src/schemas/**" + - "src/util/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.cdn + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts-cdn --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO-cdn + docker push ghcr.io/$REPO-cdn diff --git a/.github/workflows/build-docker-gateway-offload.yml b/.github/workflows/build-docker-gateway-offload.yml new file mode 100644
index 00000000..f6c6c71e --- /dev/null +++ b/.github/workflows/build-docker-gateway-offload.yml
@@ -0,0 +1,36 @@ +name: Build gateway offload docker image + +on: + push: + branches: + - master + paths: + - "extra/admin-api/Spacebar.GatewayOffload/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.gateway-offload + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts-gateway-offload --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO-gateway-offload + docker push ghcr.io/$REPO-gateway-offload diff --git a/.github/workflows/build-docker-gateway.yml b/.github/workflows/build-docker-gateway.yml new file mode 100644
index 00000000..fc5ac8b2 --- /dev/null +++ b/.github/workflows/build-docker-gateway.yml
@@ -0,0 +1,38 @@ +name: Build gateway docker image + +on: + push: + branches: + - master + paths: + - "src/gateway/**" + - "src/schemas/**" + - "src/util/**" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Build the docker image + run: nix build .#containers.x86_64-linux.docker.gateway + - run: docker load < result + - name: downcase REPO + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>$GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Tag and push the image + run: | + IMAGE_ID=$(docker images spacebar-server-ts-gateway --format '{{.ID}}') + docker tag $IMAGE_ID ghcr.io/$REPO-gateway + docker push ghcr.io/$REPO-gateway