mirror of
https://github.com/alexgo-io/gaze-brc20-indexer.git
synced 2026-01-12 14:34:54 +08:00
38 lines
866 B
YAML
38 lines
866 B
YAML
name: Build & Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v**" # e.g. v1.0.0
|
|
|
|
env:
|
|
IMAGE_REPO: ghcr.io/alexgo-io/gaze-brc20-indexer
|
|
|
|
jobs:
|
|
prepare:
|
|
name: Prepare Environment
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
tag: ${{ steps.tag.outputs.tag }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Get tag value
|
|
id: tag
|
|
run: |
|
|
TAG=${GITHUB_REF#refs/*/}
|
|
echo "Working tag: $TAG"
|
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
|
|
|
build-push:
|
|
name: Build Docker & Push to GitHub Container Registry
|
|
needs:
|
|
- prepare
|
|
if: ${{ needs.prepare.outputs.tag }}
|
|
uses: ./.github/workflows/reusable-build-and-push-ghcr.yml
|
|
with:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image-repo: "ghcr.io/alexgo-io/gaze-brc20-indexer"
|
|
image-tag: ${{ needs.prepare.outputs.tag }}
|