Skip to content

feat: enhance dashboard live resources and discover #25

feat: enhance dashboard live resources and discover

feat: enhance dashboard live resources and discover #25

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure tag is on main or master
run: |
if ! git branch -r --contains "$GITHUB_SHA" | grep -Eq 'origin/(main|master)$'; then
echo "Tag $GITHUB_REF_NAME does not point to a commit on origin/main or origin/master." >&2
exit 1
fi
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.10'
cache: true
- name: Run tests
run: go test ./...
- name: Run vet
run: go vet ./...
- name: Check npm package builder syntax
run: node --check scripts/build-npm-packages.mjs
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
runs-on: ubuntu-latest
needs: goreleaser
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
- name: Resolve build version
id: vars
run: echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.vars.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max