Skip to content

wip: initial indexer #3

wip: initial indexer

wip: initial indexer #3

Workflow file for this run

name: Rebuild Indexer images
on:
workflow_dispatch:
inputs:
commit:
description: "The namada indexer SHA commit to build"
required: true
type: string
pull_request:
paths:
- 'indexer/**'
push:
branches:
- master
paths:
- 'indexer/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
packages: write
attestations: write
id-token: write
jobs:
indexer:
strategy:
fail-fast: true
matrix:
images:
- name: "indexer-chain"
context: "indexer/chain"
sha: "main"
cache_scope: "indexer-chain-image"
- name: "indexer-transactions"
context: "indexer/transactions"
sha: "main"
cache_scope: "indexer-transactions-image"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: us-central1-docker.pkg.dev/molten-verve-216720/heliax-repository
username: _json_key
password: ${{ secrets.ANTITHESIS_GAR_JSON_KEY }}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/heliaxdev/ant-workload
us-central1-docker.pkg.dev/molten-verve-216720/heliax-repository/workload
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push (pull request / push)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
uses: docker/build-push-action@v6
with:
context: ${{ matrix.images.context }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha,scope=${{ matrix.images.cache_scope }}
cache-to: type=gha,scope=${{ matrix.images.cache_scope }},mode=max
build-args: |
GIT_SHA=${{ matrix.images.sha || 'master' }}
- name: Build and push (workflow dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v6
with:
context: ${{ matrix.images.context }}
push: true
tags: |
ghcr.io/heliaxdev/ant-${{ matrix.images.name }}:${{ github.event.inputs.commit }}
us-central1-docker.pkg.dev/molten-verve-216720/heliax-repository/${{ matrix.images.name }}:${{ github.event.inputs.commit }}
cache-from: type=gha,scope=${{ matrix.images.cache_scope }}
cache-to: type=gha,scope=${{ matrix.images.cache_scope }},mode=max
build-args: |
GIT_SHA=${{ matrix.images.commit || 'master' }}