ci: completely ignore main branch so only tags and test branches trigger runners
This commit is contained in:
1 parent
93dd6beff6
commit
8bc447c9a6
1 file changed
+4
-7
@@ -2,18 +2,16 @@ name: MindSift CI & Docker Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
branches-ignore:
|
||||
- main
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Lint, Build & Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref != 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -45,8 +43,7 @@ jobs:
|
||||
name: Build & Push Docker Image
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
# Auf 'main' werden nur Tests ausgeführt — gebaut & gepusht wird nur bei Tags oder Test-/RC-Branches
|
||||
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
|
||||
if: github.ref != 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in new issue
Block a user