Fix disabled CICD for all non pull requests

This commit is contained in:
Slim Amamou 2025-08-27 16:36:26 +01:00
parent 84ba8d0487
commit 1c24088916
2 changed files with 5 additions and 3 deletions

View file

@ -30,12 +30,13 @@ jobs:
# deploy
build:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# we run the CD only on pull requests from the same repo
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
name: Build
uses: ./.github/workflows/build.yml
deploy:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
name: Deploy
needs: [ build ]
uses: ./.github/workflows/deploy.yml

View file

@ -5,7 +5,8 @@ on:
jobs:
build:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# we run the CD only on pull requests from the same repo
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
name: Docker build
runs-on: ubuntu-latest
steps: