name: Automation - Performance

on:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  runperf:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

      - name: Setup Go
        uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
        with:
          go-version: ~1.21.5

      - name: Run benchmark
        run: make gobenchmark

      # Disabling until fine-grained permissions token enabled for the
      # repository
      #- name: Store benchmark result
      #  uses: benchmark-action/github-action-benchmark@v1
      #  with:
      #    tool: 'go'
      #    output-file-path: benchmarks.txt
      #    gh-pages-branch: gh-pages
      #    auto-push: true
      #    github-token: ${{ secrets.GITHUB_TOKEN }}
      #    benchmark-data-dir-path: "docs/dev/bench"
