mirror of
https://github.com/luxfi/indexer.git
synced 2026-09-24 00:25:37 +00:00
Merge remote-tracking branch 'origin/main'
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
name: Docker
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
# Multi-arch on luxfi org's native ARC runner pool.
|
||||
# arm64 is provisioned via QEMU until a native arm64 runner is added.
|
||||
# Semver-only — only v* tags produce {{version}} manifests.
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: [self-hosted, linux, amd64]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker-container
|
||||
driver-opts: network=host
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/luxfi/indexer
|
||||
flavor: latest=false
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=sha,prefix=sha-
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
cache-from: type=gha,scope=indexer
|
||||
cache-to: type=gha,scope=indexer,mode=max
|
||||
provenance: false
|
||||
push: true
|
||||
@@ -1,64 +0,0 @@
|
||||
name: Deploy Docs to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [self-hosted, linux, amd64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: docs/pnpm-lock.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: docs
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build docs
|
||||
working-directory: docs
|
||||
run: pnpm build
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs/out
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: [self-hosted, linux, amd64]
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -0,0 +1,56 @@
|
||||
name: Docs
|
||||
|
||||
# Builds the docs site on the native runners (git.hanzo.ai → git-runner).
|
||||
#
|
||||
# This replaces .github/workflows/docs.yml, which built the site and then
|
||||
# published it with actions/configure-pages + actions/upload-pages-artifact +
|
||||
# actions/deploy-pages. Those three speak to the GitHub Pages API, which this
|
||||
# forge does not have and is not going to grow — so the publish half cannot
|
||||
# work here at all.
|
||||
#
|
||||
# The build half is worth keeping on its own: it fails on the commit that
|
||||
# breaks the docs, path-filtered so it only runs when docs change. Publishing
|
||||
# is gone until the site is served from the PaaS.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- '.hanzo/workflows/docs.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [lux-build-linux-amd64]
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: docs/pnpm-lock.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: docs
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build docs
|
||||
working-directory: docs
|
||||
run: pnpm build
|
||||
@@ -0,0 +1,77 @@
|
||||
name: Release
|
||||
|
||||
# Builds ghcr.io/luxfi/indexer on the native runners (git.hanzo.ai → git-runner).
|
||||
#
|
||||
# This replaces .github/workflows/docker.yml. Three things about it could not
|
||||
# work here:
|
||||
#
|
||||
# * `runs-on: [self-hosted, linux, amd64]` is the bare triple. The pool on
|
||||
# this forge is named `lux-build-linux-amd64`; nothing answers to the
|
||||
# triple, and a job naming a label no runner carries does not fail, it
|
||||
# waits.
|
||||
#
|
||||
# * ghcr auth used the instance GITHUB_TOKEN, which on this forge is a Hanzo
|
||||
# Git token with no rights at ghcr.io. GHCR_USER / GHCR_TOKEN are org
|
||||
# Actions secrets sourced from KMS — the same pair luxfi/node and luxfi/kms
|
||||
# authenticate with.
|
||||
#
|
||||
# * `cache-from: type=gha` is the GitHub-hosted Actions cache service. The
|
||||
# registry cache is backend-independent.
|
||||
#
|
||||
# arm64 is dropped with it. It was built by QEMU emulation on an amd64 runner,
|
||||
# which is hours rather than minutes; it returns as a native matrix entry when
|
||||
# we own an arm64 runner. Until then this image is amd64-only.
|
||||
#
|
||||
# Semver-only: only a v* tag produces a {{version}} manifest, plus an immutable
|
||||
# sha tag on every run. No :latest, no floating tags.
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# A release is not made irrelevant by a newer one — let it finish.
|
||||
concurrency:
|
||||
group: release-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: [lux-build-linux-amd64]
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker-container
|
||||
driver-opts: network=host
|
||||
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USER }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/luxfi/indexer
|
||||
flavor: latest=false
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=sha,prefix=sha-
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
cache-from: type=registry,ref=ghcr.io/luxfi/indexer:buildcache
|
||||
cache-to: type=registry,ref=ghcr.io/luxfi/indexer:buildcache,mode=max
|
||||
provenance: false
|
||||
push: true
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
# luxfi/indexer — standalone chain-indexer daemon.
|
||||
# The unified explorer + graph live in luxfi/explorer and luxfi/graph.
|
||||
FROM golang:1.26.4-alpine AS builder
|
||||
FROM golang:1.26.5-alpine AS builder
|
||||
ENV GOTOOLCHAIN=auto
|
||||
RUN apk add --no-cache gcc musl-dev sqlite-dev
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user