Compare commits

...

46 Commits

Author SHA1 Message Date
e6b378c170 style: remove unnecessary .dockerignore
All checks were successful
Check / check (push) Successful in 1m2s
Update / update (push) Successful in 3m36s
2025-05-20 10:07:29 -04:00
Trevor Allen
fe05a64eb0
Merge pull request #14 from spotdemo4/update
update
2025-05-19 20:15:12 -04:00
github-actions[bot]
7b3d66886d build(nix): updated nix hashes 2025-05-20 00:12:53 +00:00
github-actions[bot]
bc74994ac4 build(client): updated npm dependencies 2025-05-20 00:11:03 +00:00
Trevor Allen
e20a67f7a4
Merge pull request #13 from spotdemo4/update
update
2025-05-18 20:14:57 -04:00
github-actions[bot]
01e2f3eca3 build(nix): updated nix hashes 2025-05-19 00:12:51 +00:00
github-actions[bot]
95a2a00cec build(client): updated npm dependencies 2025-05-19 00:11:04 +00:00
github-actions[bot]
b6058aa434 build(nix): updated nix dependencies 2025-05-19 00:10:26 +00:00
Trevor Allen
0adbbc3f06
Merge pull request #12 from spotdemo4/update
update
2025-05-17 20:15:32 -04:00
github-actions[bot]
46058ae5d6 build(nix): updated nix hashes 2025-05-18 00:13:30 +00:00
github-actions[bot]
94b367c2fb build(client): updated npm dependencies 2025-05-18 00:11:36 +00:00
github-actions[bot]
548efa254c build(nix): updated nix dependencies 2025-05-18 00:10:57 +00:00
68166c8d3a fix: don't prepend https. I honestly don't know how it was working before
All checks were successful
Check / check (push) Successful in 52s
Update / update (push) Successful in 3m41s
2025-05-17 04:55:04 -04:00
3a5fa69bf6 bump: v0.0.46 -> v0.0.47
All checks were successful
Check / check (push) Has been skipped
Release / check (push) Successful in 51s
Release / release (push) Successful in 2m42s
Release / package (push) Successful in 49s
2025-05-17 04:50:43 -04:00
23be247cdb fix: correct name
All checks were successful
Check / check (push) Successful in 56s
2025-05-17 04:49:14 -04:00
9a204d3808 fix: use ghcr for github 2025-05-17 04:47:55 -04:00
00e36b6c77 fix: change update path for protobuf deps
All checks were successful
Check / check (push) Successful in 54s
2025-05-17 04:34:06 -04:00
3b34d50120 bump: v0.0.45 -> v0.0.46
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Successful in 54s
Release / release (push) Successful in 2m47s
Release / package (push) Failing after 48s
2025-05-17 04:31:17 -04:00
13b652d425 fix: use pat, use shell
All checks were successful
Check / check (push) Successful in 55s
2025-05-17 04:29:39 -04:00
3bdef16173 bump: v0.0.44 -> v0.0.45
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Successful in 52s
Release / release (push) Successful in 2m52s
Release / package (push) Failing after 19s
2025-05-17 04:11:56 -04:00
968378e8bb style: rename
All checks were successful
Check / check (push) Successful in 55s
2025-05-17 04:09:13 -04:00
6767df7f91 style: rename
Some checks failed
Check / check (push) Has been cancelled
2025-05-17 04:08:10 -04:00
f9245c4145 style: move push action to new dir so github and gitea can share it
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 04:03:37 -04:00
e20156a2de style: rename github steps
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 03:08:52 -04:00
4f9dee1e27 bump: v0.0.43 -> v0.0.44
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 03:05:37 -04:00
fe8a1376fa fix: pass token
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 03:02:13 -04:00
7619be6d11 fix: checkout first
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 02:57:37 -04:00
1062595d7f fix: action path
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 02:53:39 -04:00
d829c1efb2 fix: init path
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 02:50:34 -04:00
a1f22433a0 style: move init to composite action
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 02:49:01 -04:00
43fc67ded6 bump: v0.0.42 -> v0.0.43
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 02:30:43 -04:00
8e7781a346 style: use better env
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 02:29:04 -04:00
68dd90048f bump: v0.0.41 -> v0.0.42
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 02:07:27 -04:00
7bf54bbd8c fix: use version
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 02:05:54 -04:00
9fa5818860 bump: v0.0.40 -> v0.0.41
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 01:56:26 -04:00
77859b3d94 fix: don't use repo for name
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 01:54:56 -04:00
9e26479f67 bump: v0.0.39 -> v0.0.40
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 01:50:01 -04:00
000797f930 fix: explicitly name registry
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 01:48:32 -04:00
1e8e06738b bump: v0.0.38 -> v0.0.39
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 01:45:32 -04:00
28dbf76789 fix: use repo name as name
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 01:43:58 -04:00
93aa1ebd3b bump: v0.0.37 -> v0.0.38
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 01:22:25 -04:00
bf13344cbe fix: needs check
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 01:20:56 -04:00
62358e100c bump: v0.0.36 -> v0.0.37
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 01:20:13 -04:00
7ee1cd94dc fix: use ref_name
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 01:18:40 -04:00
893aa4db51 bump: v0.0.35 -> v0.0.36
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Failing after 0s
Release / release (push) Has been skipped
Release / package (push) Has been skipped
2025-05-17 01:06:22 -04:00
6b9da9dc15 feat: build images with nix
Some checks failed
Check / check (push) Failing after 0s
2025-05-17 01:04:39 -04:00
16 changed files with 605 additions and 1596 deletions

21
.actions/init/action.yaml Normal file
View File

@ -0,0 +1,21 @@
name: "Initialize"
description: "Install nix & use cachix"
inputs:
token:
description: "cachix auth token"
required: true
runs:
using: "composite"
steps:
- name: Install nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ inputs.token }}"

63
.actions/push/action.yaml Normal file
View File

@ -0,0 +1,63 @@
name: "Docker Push"
description: "Push to docker registry"
inputs:
server_url:
required: true
repository:
required: true
tag:
required: true
runs:
using: "composite"
steps:
- name: Set env
shell: bash
run: |
REGISTRY=$(basename ${{ inputs.server_url }})
NR=${{ inputs.repository }}
NAMESPACE="${NR%%/*}"
REPOSITORY="${NR##*/}"
TAG=${{ inputs.tag }}
VERSION=${TAG#v}
echo "REGISTRY=${REGISTRY}" >> $GITHUB_ENV
echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV
echo "REPOSITORY=${REPOSITORY}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Push images
shell: bash
run: |
docker image tag $REPOSITORY:$VERSION-amd64 $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-amd64
docker push $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-amd64
docker image tag $REPOSITORY:$VERSION-arm64 $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm64
docker push $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm64
docker image tag $REPOSITORY:$VERSION-arm $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm
docker push $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm
- name: Push manifest
shell: bash
run: |
docker manifest create $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION \
$REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-amd64 \
$REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm64 \
$REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm
docker manifest annotate $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-amd64 --arch amd64
docker manifest annotate $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm64 --arch arm64
docker manifest annotate $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm --arch arm
docker manifest push $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION
docker manifest create $REGISTRY/$NAMESPACE/$REPOSITORY:latest \
$REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-amd64 \
$REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm64 \
$REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm
docker manifest annotate $REGISTRY/$NAMESPACE/$REPOSITORY:latest $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-amd64 --arch amd64
docker manifest annotate $REGISTRY/$NAMESPACE/$REPOSITORY:latest $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm64 --arch arm64
docker manifest annotate $REGISTRY/$NAMESPACE/$REPOSITORY:latest $REGISTRY/$NAMESPACE/$REPOSITORY:$VERSION-arm --arch arm
docker manifest push $REGISTRY/$NAMESPACE/$REPOSITORY:latest

View File

@ -1,14 +0,0 @@
.env
/docker-compose.*
/result*
/.direnv/
/build/
# Client
/client/node_modules/
/client/.svelte-kit/
# Server
/server/client/
/server/tmp/
/server/build/

View File

@ -12,22 +12,12 @@ jobs:
name: check name: check
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: | if: |
contains(gitea.event.head_commit.message, 'bump:') == false && contains(github.event.head_commit.message, 'bump:') == false &&
contains(gitea.event.head_commit.message, 'Merge pull request') == false contains(github.event.head_commit.message, 'Merge pull request') == false
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix - run: nix flake check
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check

View File

@ -9,43 +9,23 @@ jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix - run: nix flake check
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: check needs: check
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix - run: >
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build
run: >
nix build nix build
.#trevstack-linux-amd64 .#trevstack-linux-amd64
.#trevstack-linux-arm64 .#trevstack-linux-arm64
@ -54,52 +34,35 @@ jobs:
.#trevstack-darwin-amd64 .#trevstack-darwin-amd64
.#trevstack-darwin-arm64 .#trevstack-darwin-arm64
- name: Release - uses: akkuman/gitea-release-action@v1
uses: akkuman/gitea-release-action@v1
with: with:
files: |- files: |-
result*/bin/* result*/bin/*
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
package: package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: release # Wait for binary cache to propagate needs: release
steps: steps:
- name: Get domain - uses: actions/checkout@v4
id: get_domain - uses: ./.actions/init
run: |
DOMAIN=$(basename ${{ gitea.server_url }})
echo $DOMAIN
echo "domain=$DOMAIN" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with: with:
# list of Docker images to use as base name for tags token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
images: |
${{ steps.get_domain.outputs.domain }}/${{ gitea.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Login to Gitea Container Registry - uses: docker/login-action@v3
uses: docker/login-action@v3
with: with:
registry: ${{ gitea.server_url }} registry: ${{ github.server_url }}
username: ${{ gitea.actor }} username: ${{ github.actor }}
password: ${{ secrets.PAT }} password: ${{ secrets.PAT }}
- name: Set up QEMU - name: Build & load images
uses: docker/setup-qemu-action@v3 run: |
nix build .#trevstack-linux-amd64-image && ./result | docker load
nix build .#trevstack-linux-arm64-image && ./result | docker load
nix build .#trevstack-linux-arm-image && ./result | docker load
- name: Set up Docker Buildx - name: Push images
uses: docker/setup-buildx-action@v3 uses: ./.actions/push
- name: Build and push
uses: docker/build-push-action@v6
with: with:
push: true server_url: ${{ github.server_url }}
tags: ${{ steps.meta.outputs.tags }} repository: ${{ github.repository }}
labels: ${{ steps.meta.outputs.labels }} tag: ${{ github.ref_name }}

View File

@ -9,33 +9,21 @@ jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
with: with:
fetch-depth: 0 token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# https://github.com/actions/checkout/issues/13 # https://github.com/actions/checkout/issues/13
- name: Set Git Config - name: Set git config
run: | run: |
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -B update git checkout -B update
- name: Update - run: nix run .#update
run: nix run .#update
- name: Create Pull Request - name: Create pull request
env: env:
PAT: ${{ secrets.PAT }} PAT: ${{ secrets.PAT }}
run: | run: |
@ -48,14 +36,14 @@ jobs:
PR_RESPONSE=$(curl -s -X POST -H "Authorization: token $PAT" \ PR_RESPONSE=$(curl -s -X POST -H "Authorization: token $PAT" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"title":"update","body":"automatic update","head":"update","base":"main"}' \ -d '{"title":"update","body":"automatic update","head":"update","base":"main"}' \
"https://$URL/api/v1/repos/$REPO_OWNER_SLASH_NAME/pulls") "$URL/api/v1/repos/$REPO_OWNER_SLASH_NAME/pulls")
PR_NUMBER=$(echo "$PR_RESPONSE" | jq -r '.number') PR_NUMBER=$(echo "$PR_RESPONSE" | jq -r '.number')
curl -s -X POST -H "Authorization: token $PAT" \ curl -s -X POST -H "Authorization: token $PAT" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"Do":"merge","merge_when_checks_succeed":true,"delete_branch_after_merge":true}' \ -d '{"Do":"merge","merge_when_checks_succeed":true,"delete_branch_after_merge":true}' \
"https://$URL/api/v1/repos/$REPO_OWNER_SLASH_NAME/pulls/$PR_NUMBER/merge" "$URL/api/v1/repos/$REPO_OWNER_SLASH_NAME/pulls/$PR_NUMBER/merge"
else else
git push origin update --force git push origin update --force

View File

@ -15,19 +15,9 @@ jobs:
contains(github.event.head_commit.message, 'bump:') == false && contains(github.event.head_commit.message, 'bump:') == false &&
contains(github.event.head_commit.message, 'Merge pull request') == false contains(github.event.head_commit.message, 'Merge pull request') == false
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix - run: nix flake check
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check

View File

@ -13,43 +13,23 @@ jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix - run: nix flake check
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: check needs: check
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix - run: >
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build
run: >
nix build nix build
.#trevstack-linux-amd64 .#trevstack-linux-amd64
.#trevstack-linux-arm64 .#trevstack-linux-arm64
@ -58,46 +38,36 @@ jobs:
.#trevstack-darwin-amd64 .#trevstack-darwin-amd64
.#trevstack-darwin-arm64 .#trevstack-darwin-arm64
- name: Release - uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v2
with: with:
generate_release_notes: true generate_release_notes: true
files: |- files: |-
result*/bin/* result*/bin/*
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
package: package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: release # Wait for binary cache to propagate needs: release
steps: steps:
- name: Docker meta - uses: actions/checkout@v4
id: meta - uses: ./.actions/init
uses: docker/metadata-action@v5
with: with:
# list of Docker images to use as base name for tags token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
images: |
ghcr.io/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Login to GitHub Container Registry - uses: docker/login-action@v3
uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Build & load images
uses: docker/setup-qemu-action@v3 run: |
nix build .#trevstack-linux-amd64-image && ./result | docker load
nix build .#trevstack-linux-arm64-image && ./result | docker load
nix build .#trevstack-linux-arm-image && ./result | docker load
- name: Set up Docker Buildx - name: Push images
uses: docker/setup-buildx-action@v3 uses: ./.actions/push
- name: Build and push
uses: docker/build-push-action@v6
with: with:
push: true server_url: ghcr.io
tags: ${{ steps.meta.outputs.tags }} repository: ${{ github.repository }}
labels: ${{ steps.meta.outputs.labels }} tag: ${{ github.ref_name }}

View File

@ -13,30 +13,20 @@ jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4 - uses: ./.actions/init
- name: Install Nix
uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# https://github.com/actions/checkout/issues/13 # https://github.com/actions/checkout/issues/13
- name: Set Git Config - name: Set git config
run: | run: |
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Update - run: nix run .#update
run: nix run .#update
- name: Create Pull Request - name: Create pull request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v7
with: with:
@ -44,7 +34,7 @@ jobs:
title: update title: update
body: automatic update body: automatic update
- name: Enable Automerge - name: Enable automerge
run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}" run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
env: env:
GH_TOKEN: ${{ secrets.PAT }} GH_TOKEN: ${{ secrets.PAT }}

View File

@ -12,6 +12,7 @@ if ! git diff --exit-code flake.lock; then
fi fi
echo "updating protobuf deps" echo "updating protobuf deps"
cd "${git_root}/proto"
buf dep update buf dep update
if ! git diff --exit-code buf.lock; then if ! git diff --exit-code buf.lock; then
git add buf.lock git add buf.lock

View File

@ -1,30 +0,0 @@
# Nix builder
FROM nixos/nix:latest AS builder
# Copy our source and setup our working dir.
COPY . /tmp/build
WORKDIR /tmp/build
# Build our Nix environment
RUN nix \
--extra-experimental-features "nix-command flakes" \
--option filter-syscalls false \
--accept-flake-config \
build
# Copy the Nix store closure into a directory. The Nix store closure is the
# entire set of Nix store values that we need for our build.
RUN mkdir /tmp/nix-store-closure
RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure
# Final image is based on scratch. We copy a bunch of Nix dependencies
# but they're fully self-contained so we don't need Nix anymore.
FROM scratch
WORKDIR /app
# Copy /nix/store
COPY --from=builder /tmp/nix-store-closure /nix/store
COPY --from=builder /tmp/build/result /app
CMD ["/app/bin/trevstack"]

1744
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{ {
"name": "trevstack", "name": "trevstack",
"private": true, "private": true,
"version": "0.0.35", "version": "0.0.47",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
@ -21,29 +21,29 @@
"@eslint/js": "^9.18.0", "@eslint/js": "^9.18.0",
"@ianvs/prettier-plugin-sort-imports": "^4.4.1", "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
"@lucide/svelte": "^0.479.0", "@lucide/svelte": "^0.479.0",
"@scalar/api-reference": "^1.28.33", "@scalar/api-reference": "^1.28.34",
"@simplewebauthn/browser": "^13.1.0", "@simplewebauthn/browser": "^13.1.0",
"@sveltejs/adapter-static": "^3.0.8", "@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.21.0", "@sveltejs/kit": "^2.21.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3", "@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tailwindcss/vite": "^4.1.6", "@tailwindcss/vite": "^4.1.7",
"bits-ui": "^1.4.8", "bits-ui": "^1.5.3",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"eslint": "^9.26.0", "eslint": "^9.27.0",
"eslint-config-prettier": "^10.1.5", "eslint-config-prettier": "^10.1.5",
"eslint-plugin-svelte": "^3.6.0", "eslint-plugin-svelte": "^3.8.1",
"globals": "^16.1.0", "globals": "^16.1.0",
"mode-watcher": "^1.0.7", "mode-watcher": "^1.0.7",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"prettier-plugin-svelte": "^3.3.3", "prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.6.11", "prettier-plugin-tailwindcss": "^0.6.11",
"svelte": "^5.28.6", "svelte": "^5.31.1",
"svelte-check": "^4.1.7", "svelte-check": "^4.2.1",
"svelte-sonner": "^0.3.28", "svelte-sonner": "^0.3.28",
"tailwind-merge": "^3.3.0", "tailwind-merge": "^3.3.0",
"tailwind-variants": "^1.0.0", "tailwind-variants": "^1.0.0",
"tailwindcss": "^4.0.13", "tailwindcss": "^4.0.13",
"tw-animate-css": "^1.2.9", "tw-animate-css": "^1.3.0",
"typescript": "^5.8.3", "typescript": "^5.8.3",
"typescript-eslint": "^8.32.1", "typescript-eslint": "^8.32.1",
"vite": "^6.3.5" "vite": "^6.3.5"

6
flake.lock generated
View File

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1746904237, "lastModified": 1747542820,
"narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -21,7 +21,7 @@
... ...
}: let }: let
pname = "trevstack"; pname = "trevstack";
version = "0.0.35"; version = "0.0.47";
build-systems = [ build-systems = [
"x86_64-linux" "x86_64-linux"
@ -83,7 +83,10 @@
packages = with pkgs; [ packages = with pkgs; [
treli.packages."${system}".default treli.packages."${system}".default
git git
# Nix
nix-update nix-update
alejandra
# Server # Server
go go
@ -127,7 +130,7 @@
pname = "check-client"; pname = "check-client";
inherit version; inherit version;
src = ./client; src = ./client;
npmDepsHash = "sha256-3Ry+R3xOtYmQXXbCxnoteIm41R8O3CYBJ4JxIfMjZOM="; npmDepsHash = "sha256-dl32ehKir0dZ4uiJ4s59xPIIbMkkZtH9dlTm4W0PZag=";
dontNpmInstall = true; dontNpmInstall = true;
buildPhase = '' buildPhase = ''
@ -190,7 +193,7 @@
client = pkgs.buildNpmPackage { client = pkgs.buildNpmPackage {
inherit pname version; inherit pname version;
src = ./client; src = ./client;
npmDepsHash = "sha256-3Ry+R3xOtYmQXXbCxnoteIm41R8O3CYBJ4JxIfMjZOM="; npmDepsHash = "sha256-dl32ehKir0dZ4uiJ4s59xPIIbMkkZtH9dlTm4W0PZag=";
installPhase = '' installPhase = ''
cp -r build "$out" cp -r build "$out"
@ -208,11 +211,8 @@
HOME=$PWD HOME=$PWD
''; '';
}; };
in
{ binaries = builtins.listToAttrs (builtins.map (x: {
default = server;
}
// builtins.listToAttrs (builtins.map (x: {
name = "${pname}-${x.GOOS}-${x.GOARCH}"; name = "${pname}-${x.GOOS}-${x.GOARCH}";
value = server.overrideAttrs { value = server.overrideAttrs {
nativeBuildInputs = nativeBuildInputs =
@ -235,7 +235,28 @@
''; '';
}; };
}) })
host-systems) host-systems);
images = builtins.listToAttrs (builtins.map (x: {
name = "${pname}-${x.GOOS}-${x.GOARCH}-image";
value = pkgs.dockerTools.streamLayeredImage {
name = "${pname}";
tag = "${version}-${x.GOARCH}";
created = "now";
architecture = "${x.GOARCH}";
contents = [binaries."${pname}-${x.GOOS}-${x.GOARCH}"];
config = {
Cmd = ["${binaries."${pname}-${x.GOOS}-${x.GOARCH}"}/bin/${pname}-${x.GOOS}-${x.GOARCH}-${version}"];
};
};
})
(builtins.filter (x: x.GOOS == "linux") host-systems));
in
{
default = server;
}
// binaries
// images
); );
}; };
} }

View File

@ -3,7 +3,7 @@ servers:
- url: /grpc - url: /grpc
info: info:
title: Trevstack API title: Trevstack API
version: 0.0.35 version: 0.0.47
description: API for Trevstack description: API for Trevstack
contact: contact:
name: Trev name: Trev