14 Commits

Author SHA1 Message Date
58498c87af bump: v0.0.29 -> v0.0.30
All checks were successful
Check / check (push) Has been skipped
Release / check (push) Successful in 1m29s
Release / release (push) Successful in 3m21s
Release / package (push) Successful in 1m35s
2025-05-14 07:12:08 -04:00
fd9abb948a fix: set gitea url
All checks were successful
Check / check (push) Successful in 52s
2025-05-14 07:10:29 -04:00
2b07f74cc1 bump: v0.0.28 -> v0.0.29
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Successful in 1m36s
Release / release (push) Successful in 3m23s
Release / package (push) Failing after 3m7s
2025-05-14 06:58:32 -04:00
ee4d2984dd fix: remove unused repo
All checks were successful
Check / check (push) Successful in 1m19s
2025-05-14 06:56:12 -04:00
dd80776bb1 bump: v0.0.27 -> v0.0.28
Some checks are pending
Release / package (push) Blocked by required conditions
Release / check (push) Successful in 52s
Release / release (push) Successful in 6m37s
Check / check (push) Has been skipped
2025-05-14 06:31:13 -04:00
d0e7ae9284 fix: set HOME
All checks were successful
Check / check (push) Successful in 53s
2025-05-14 06:29:21 -04:00
63433be0bb bump: v0.0.26 -> v0.0.27
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Successful in 1m48s
Release / release (push) Failing after 1m27s
Release / package (push) Has been skipped
2025-05-14 06:11:54 -04:00
1a856e575e fix: use single user mode for gitea
All checks were successful
Check / check (push) Successful in 52s
2025-05-14 06:08:40 -04:00
a3e4154fb6 bump: v0.0.25 -> v0.0.26
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Successful in 55s
Release / release (push) Failing after 1m30s
Release / package (push) Has been skipped
2025-05-14 05:55:36 -04:00
4839b74bf7 feat: gitea workflows
All checks were successful
Check / check (push) Successful in 52s
2025-05-14 05:48:08 -04:00
dcf5a16c3f fix: import buf 2025-05-14 05:13:11 -04:00
932d82c1fc fix: update buf deps 2025-05-14 05:11:19 -04:00
db509ffa8a feat: auto updates 2025-05-14 05:00:06 -04:00
c4392601b1 fix: bump correctly 2025-05-14 04:39:13 -04:00
11 changed files with 202 additions and 14 deletions

View File

@ -0,0 +1,33 @@
name: Check
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, edited, auto_merge_enabled]
jobs:
check:
name: check
runs-on: ubuntu-latest
if: |
contains(github.event.head_commit.message, 'bump:') == false &&
contains(github.event.head_commit.message, 'Merge pull request') == false
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 }}"
- name: Check
run: nix flake check

View File

@ -0,0 +1,98 @@
name: Release
on:
push:
tags:
- "*"
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 }}"
- name: Check
run: nix flake check
release:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 }}"
- name: Build
run: >
nix build
.#trevstack-linux-amd64
.#trevstack-linux-arm64
.#trevstack-linux-arm
.#trevstack-windows-amd64
.#trevstack-darwin-amd64
.#trevstack-darwin-arm64
- name: Release
uses: akkuman/gitea-release-action@v1
with:
files: |-
result*/bin/*
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
package:
runs-on: ubuntu-latest
needs: release # Wait for binary cache to propagate
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{ vars.URL }}/${{ github.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
with:
registry: ${{ vars.URL }}
username: ${{ vars.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -0,0 +1,39 @@
name: Update
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
- name: Set Git Config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Update
run: nix run .#update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: update
body: automatic update

View File

@ -5,7 +5,7 @@ on:
branches: branches:
- main - main
pull_request: pull_request:
types: [opened, reopened, edited] types: [opened, reopened, edited, auto_merge_enabled]
jobs: jobs:
check: check:

View File

@ -5,6 +5,10 @@ on:
- cron: "0 0 * * *" - cron: "0 0 * * *"
workflow_dispatch: workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs: jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -35,5 +39,10 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v7
with: with:
delete-branch: true title: update
title: Bump deps body: automatic update
- name: Enable Automerge
run: gh pr merge --merge --auto "1"
env:
GH_TOKEN: ${{ secrets.PAT }}

View File

@ -7,7 +7,7 @@ version=${git_version#v}
major=$(echo "${version}" | cut -d . -f1) major=$(echo "${version}" | cut -d . -f1)
minor=$(echo "${version}" | cut -d . -f2) minor=$(echo "${version}" | cut -d . -f2)
patch=$(echo "${version}" | cut -d . -f3) patch=$(echo "${version}" | cut -d . -f3)
case "${1}" in case "${1-patch}" in
major) major=$((major + 1)) ;; major) major=$((major + 1)) ;;
minor) minor=$((minor + 1)) ;; minor) minor=$((minor + 1)) ;;
*) patch=$((patch + 1)) ;; *) patch=$((patch + 1)) ;;

View File

@ -11,6 +11,13 @@ if ! git diff --exit-code flake.lock; then
git commit -m "build(nix): updated nix dependencies" git commit -m "build(nix): updated nix dependencies"
fi fi
echo "updating protobuf deps"
buf dep update
if ! git diff --exit-code buf.lock; then
git add buf.lock
git commit -m "build(buf): updated buf dependencies"
fi
echo "updating client" echo "updating client"
cd "${git_root}/client" cd "${git_root}/client"
npm update --save && npm i npm update --save && npm i

View File

@ -1,12 +1,12 @@
{ {
"name": "trevstack", "name": "trevstack",
"version": "0.0.25", "version": "0.0.30",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "trevstack", "name": "trevstack",
"version": "0.0.25", "version": "0.0.30",
"devDependencies": { "devDependencies": {
"@bufbuild/protovalidate": "^0.1.1", "@bufbuild/protovalidate": "^0.1.1",
"@connectrpc/connect": "^2.0.2", "@connectrpc/connect": "^2.0.2",

View File

@ -1,7 +1,7 @@
{ {
"name": "trevstack", "name": "trevstack",
"private": true, "private": true,
"version": "0.0.25", "version": "0.0.30",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",

View File

@ -21,7 +21,7 @@
... ...
}: let }: let
pname = "trevstack"; pname = "trevstack";
version = "0.0.25"; version = "0.0.30";
build-systems = [ build-systems = [
"x86_64-linux" "x86_64-linux"
@ -92,7 +92,7 @@
revive revive
sqlc sqlc
# database # Database
sqlite sqlite
dbmate dbmate
sqlfluff sqlfluff
@ -127,7 +127,7 @@
pname = "check-client"; pname = "check-client";
inherit version; inherit version;
src = ./client; src = ./client;
npmDepsHash = "sha256-IVTm9gQx2ceQoqyJfIz1PJeq3/yb/3NSgMNTIWSsDMQ="; npmDepsHash = "sha256-oSwCfpI1epHLqPy44c+RKmo08LhRQqnVwLuYVMeuu7U=";
dontNpmInstall = true; dontNpmInstall = true;
buildPhase = '' buildPhase = ''
@ -160,9 +160,10 @@
runtimeInputs = with pkgs; [ runtimeInputs = with pkgs; [
git git
nix nix
nodejs_22
go
nix-update nix-update
go
buf
nodejs_22
]; ];
text = builtins.readFile ./.scripts/update.sh; text = builtins.readFile ./.scripts/update.sh;
}); });
@ -189,7 +190,7 @@
client = pkgs.buildNpmPackage { client = pkgs.buildNpmPackage {
inherit pname version; inherit pname version;
src = ./client; src = ./client;
npmDepsHash = "sha256-IVTm9gQx2ceQoqyJfIz1PJeq3/yb/3NSgMNTIWSsDMQ="; npmDepsHash = "sha256-oSwCfpI1epHLqPy44c+RKmo08LhRQqnVwLuYVMeuu7U=";
installPhase = '' installPhase = ''
cp -r build "$out" cp -r build "$out"
@ -204,6 +205,7 @@
preBuild = '' preBuild = ''
cp -r ${client} client cp -r ${client} client
HOME=$PWD
''; '';
}; };
in in

View File

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