Skip to content

Commit fd73419

Browse files
authored
ci: prevent workflows execution on forks and allow workflow_dispatch for docker-build (#147)
1 parent a8c92b2 commit fd73419

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/conventional-commits.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99

1010
jobs:
1111
lint-pr-title:
12+
# Prevent execution on forks
13+
if: github.repository_owner == 'iExecBlockchainComputing'
1214
permissions:
1315
pull-requests: read
1416
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/conventional-commits.yml@conventional-commits-v1.1.0

.github/workflows/docker-build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
branches: [main]
77
tags:
88
- 'v*.*.*'
9+
# can only be executed by people with write access on repository
10+
workflow_dispatch:
911

1012
jobs:
1113
prepare:
1214
name: Determine image tag
1315
runs-on: ubuntu-latest
16+
# Prevent execution on forks
17+
if: github.repository_owner == 'iExecBlockchainComputing'
1418
outputs:
1519
image_tag: ${{ steps.determine-tag.outputs.image_tag }}
1620
steps:

.github/workflows/release-please.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ permissions:
1212

1313
jobs:
1414
release-please:
15+
# Prevent execution on forks
16+
if: github.repository_owner == 'iExecBlockchainComputing'
1517
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/release-please.yml@release-please-v2.0.0
1618
secrets: inherit

0 commit comments

Comments
 (0)