Only allow creating hotfix branches from a tag#8297
Conversation
| steps: | ||
| - name: Verify running from a tag | ||
| run: | | ||
| if [[ "${{ github.ref }}" != refs/tags/* ]]; then |
There was a problem hiding this comment.
Just remembered, I think we are supposed to make the github.ref an ENV_VAR like in this PR #7599
There was a problem hiding this comment.
Oh, well remembered... I actually think it's fine, seeing as this isn't triggered automatically by an action like the one fixed in that PR (that one is triggered on PR close, so is fundamentally user controlled, this one can only be manually triggered). If it was an issue, I'm pretty sure they would have flagged our release workflows too 🙂
I mean, I'm making excuses not to make changes, maybe I should just do it 😂
29c9eb2 to
3d78450
Compare
BenchmarksBenchmark execution time: 2026-03-16 10:54:08 Comparing candidate commit 3d78450 in PR branch Found 9 performance improvements and 4 performance regressions! Performance is the same for 157 metrics, 22 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472
scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1
|
Summary of changes
Ensures you're creating a hotfix branch from a tag
Reason for change
The "correct" usage is to create a hotfix from a previous normal release, or from a previous hotfix. The easy way to enforce that is to ensure you create from a tag
Implementation details
Check the reference passed in, like we do for other workflows
Test coverage
Tested it here and it failed (as expected).