Skip to content

Trigger Site Rebuild on a CRON Schedule #24

Trigger Site Rebuild on a CRON Schedule

Trigger Site Rebuild on a CRON Schedule #24

name: "Trigger Site Rebuild on a CRON Schedule"
on:
schedule:
# runs at 02:00 every day, UTC
- cron: "0 2 * * *"
env:
GO_VERSION: '1.20'
jobs:
benchmark-publish:
name: Run Benchmark
if: github.repository == 'open-feature/flagd'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Workspace init
run: make workspace-init
- name: Run benchmark
run: set -o pipefail; go test -bench=Bench -short -benchtime=5s -benchmem ./core/... | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Go Benchmark
tool: "go"
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "130%"
comment-on-alert: true
fail-on-alert: false