Skip to content

Commit 4bfe1ae

Browse files
authored
ci: don't run container/deploy jobs in forks (#4163)
* ci: test build in fork * ci: don't run container/deploy jobs in forks Otherwise they might fail with errors like: ``` Run actions/configure-pages@v5 Error: Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action. Error: Not Found - https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site Error: HttpError: Not Found - https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site ``` Or: ``` Run docker/login-action@v3 Error: Username and password required ```
1 parent f55521d commit 4bfe1ae

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.github/workflows/container-build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'Dockerfile.ci'
1111
jobs:
1212
container-build:
13+
if: github.repository == 'conventional-changelog/commitlint'
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: checkout

.github/workflows/docs-deploy.yml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ concurrency:
1818
jobs:
1919
# Build job
2020
build:
21+
if: github.repository == 'conventional-changelog/commitlint'
2122
runs-on: ubuntu-latest
2223
steps:
2324
- name: Checkout
@@ -49,6 +50,7 @@ jobs:
4950

5051
# Deployment job
5152
deploy:
53+
if: github.repository == 'conventional-changelog/commitlint'
5254
environment:
5355
name: docs
5456
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)