chore: update workflows to trigger on completion of Docker Build, Publish & Test

This commit is contained in:
GitHub Actions
2026-02-08 02:48:55 +00:00
parent cbf61acfef
commit 5ab66ddbc1
14 changed files with 129 additions and 154 deletions

View File

@@ -1,22 +1,13 @@
name: Go Benchmark
on:
push:
branches:
- main
- development
- 'feature/**'
- 'hotfix/**'
pull_request:
branches:
- main
- development
- 'feature/**'
- 'hotfix/**'
workflow_run:
workflows: ["Docker Build, Publish & Test"]
types: [completed]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
env:
@@ -31,6 +22,7 @@ jobs:
benchmark:
name: Performance Regression Check
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
# Grant write permissions for storing benchmark results (only used on push via step condition)
# Note: GitHub Actions doesn't support dynamic expressions in permissions block
permissions:
@@ -38,6 +30,8 @@ jobs:
deployments: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
@@ -52,7 +46,7 @@ jobs:
- name: Store Benchmark Result
# Only store results on pushes to main - PRs just run benchmarks without storage
# This avoids gh-pages branch errors and permission issues on fork PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'main'
# Security: Pinned to full SHA for supply chain security
uses: benchmark-action/github-action-benchmark@4e0b38bc48375986542b13c0d8976b7b80c60c00 # v1
with: