fix: CI runs only once - on release publish, not on tag push
Removed duplicate CI triggers: - Before: Ran on push to branches AND on tag push (doubled) - After: Runs on push to branches OR when release is published This prevents wasted CI resources and confusion.
This commit is contained in:
@@ -6,9 +6,10 @@ name: CI/CD
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, master, develop]
|
branches: [main, master, develop]
|
||||||
tags: ['v*']
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -63,7 +64,7 @@ jobs:
|
|||||||
name: Build & Release
|
name: Build & Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test, lint]
|
needs: [test, lint]
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: github.event_name == 'release'
|
||||||
container:
|
container:
|
||||||
image: golang:1.24-bookworm
|
image: golang:1.24-bookworm
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user