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 # deploy
build: 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 name: Build
uses: ./.github/workflows/build.yml uses: ./.github/workflows/build.yml
deploy: 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 name: Deploy
needs: [ build ] needs: [ build ]
uses: ./.github/workflows/deploy.yml uses: ./.github/workflows/deploy.yml

View file

@ -5,7 +5,8 @@ on:
jobs: jobs:
build: 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 name: Docker build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps: