Fix disabled CICD for all non pull requests
This commit is contained in:
parent
84ba8d0487
commit
1c24088916
2 changed files with 5 additions and 3 deletions
5
.github/workflows/cd.yml
vendored
5
.github/workflows/cd.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue