6 Commits

Author SHA1 Message Date
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
8 changed files with 74 additions and 99 deletions

21
.github/actions/init/action.yaml vendored 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 }}"

View File

@ -15,19 +15,10 @@ jobs:
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
- uses: actions/checkout@v4
- uses: ./.github/actions/init
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check

View File

@ -13,78 +13,50 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
- uses: actions/checkout@v4
- uses: ./.github/actions/init
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 }}"
- name: Check
- name: check
run: nix flake check
# release:
# runs-on: ubuntu-latest
# needs: check
# steps:
# - name: Checkout
# uses: actions/checkout@v4
release:
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init
with:
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# - name: Install Nix
# uses: cachix/install-nix-action@v31
# with:
# nix_path: nixpkgs=channel:nixos-unstable
- name: build
run: >
nix build
.#trevstack-linux-amd64
.#trevstack-linux-arm64
.#trevstack-linux-arm
.#trevstack-windows-amd64
.#trevstack-darwin-amd64
.#trevstack-darwin-arm64
# - name: Use Cachix
# uses: cachix/cachix-action@v16
# with:
# name: trevstack
# authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |-
result*/bin/*
# - 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: softprops/action-gh-release@v2
# with:
# generate_release_notes: true
# files: |-
# result*/bin/*
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
package:
runs-on: ubuntu-latest
needs: check # Wait for binary cache to propagate
needs: release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
- uses: actions/checkout@v4
- uses: ./.github/actions/init
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 }}"
- name: Set env
- name: set env
run: |
TAG=${{ github.ref_name }}
VERSION=${TAG#v}
@ -93,20 +65,20 @@ jobs:
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "REGISTRY=${REGISTRY}" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
- name: login to github container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Load Images
- name: build & load images
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: Push Images
- name: push images
run: |
docker image tag trevstack:$VERSION-amd64 $REGISTRY/$GITHUB_REPOSITORY:$VERSION-amd64
docker push $REGISTRY/$GITHUB_REPOSITORY:$VERSION-amd64
@ -117,7 +89,7 @@ jobs:
docker image tag trevstack:$VERSION-arm $REGISTRY/$GITHUB_REPOSITORY:$VERSION-arm
docker push $REGISTRY/$GITHUB_REPOSITORY:$VERSION-arm
- name: Push Manifest
- name: push manifest
run: |
docker manifest create $REGISTRY/$GITHUB_REPOSITORY:$VERSION \
$REGISTRY/$GITHUB_REPOSITORY:$VERSION-amd64 \

View File

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

View File

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

View File

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

View File

@ -21,7 +21,7 @@
...
}: let
pname = "trevstack";
version = "0.0.43";
version = "0.0.44";
build-systems = [
"x86_64-linux"
@ -130,7 +130,7 @@
pname = "check-client";
inherit version;
src = ./client;
npmDepsHash = "sha256-vgOTish91m4iVNCMuLfFRpTGdyyVr+/g4Ex3PRWqqGI=";
npmDepsHash = "sha256-W48OgBIJQjN4O7++t3tE2PaRaHMEgdL7C8QmLq4gfNE=";
dontNpmInstall = true;
buildPhase = ''
@ -193,7 +193,7 @@
client = pkgs.buildNpmPackage {
inherit pname version;
src = ./client;
npmDepsHash = "sha256-vgOTish91m4iVNCMuLfFRpTGdyyVr+/g4Ex3PRWqqGI=";
npmDepsHash = "sha256-W48OgBIJQjN4O7++t3tE2PaRaHMEgdL7C8QmLq4gfNE=";
installPhase = ''
cp -r build "$out"

View File

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