Skip to content

Commit 664a938

Browse files
committed
CI: skip some jobs when repo != containerd/containerd
For running CI in a non-upstream repo Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit fe0116e) > Conflicts: > .github/workflows/codeql.yml > .github/workflows/fuzz.yml Signed-off-by: Akihiro Suda <[email protected]>
1 parent 839086b commit 664a938

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
#
5757
project:
5858
name: Project Checks
59+
if: github.repository == 'containerd/containerd'
5960
runs-on: ubuntu-20.04
6061
timeout-minutes: 5
6162

@@ -135,7 +136,7 @@ jobs:
135136
# Make sure binaries compile with other platforms
136137
crossbuild:
137138
name: Crossbuild Binaries
138-
needs: [project, linters, protos, man]
139+
needs: [linters, protos, man]
139140
runs-on: ubuntu-20.04
140141
timeout-minutes: 10
141142
strategy:
@@ -227,7 +228,7 @@ jobs:
227228
name: Binaries
228229
runs-on: ${{ matrix.os }}
229230
timeout-minutes: 10
230-
needs: [project, linters, protos, man]
231+
needs: [linters, protos, man]
231232

232233
strategy:
233234
matrix:
@@ -267,7 +268,7 @@ jobs:
267268
name: Windows Integration
268269
runs-on: ${{ matrix.os }}
269270
timeout-minutes: 35
270-
needs: [project, linters, protos, man]
271+
needs: [linters, protos, man]
271272
env:
272273
GOTEST: gotestsum --
273274

@@ -356,7 +357,7 @@ jobs:
356357
name: Linux Integration
357358
runs-on: ubuntu-20.04
358359
timeout-minutes: 40
359-
needs: [project, linters, protos, man]
360+
needs: [linters, protos, man]
360361

361362
strategy:
362363
fail-fast: false
@@ -486,7 +487,7 @@ jobs:
486487
name: MacOS unit tests
487488
runs-on: macos-12
488489
timeout-minutes: 10
489-
needs: [project, linters, protos, man]
490+
needs: [linters, protos, man]
490491
env:
491492
GOTEST: gotestsum --
492493

@@ -512,7 +513,7 @@ jobs:
512513
# nested virtualization is only available on macOS hosts
513514
runs-on: macos-12
514515
timeout-minutes: 45
515-
needs: [project, linters, protos, man]
516+
needs: [linters, protos, man]
516517
strategy:
517518
fail-fast: false
518519
matrix:
@@ -583,7 +584,7 @@ jobs:
583584
# nested virtualization is only available on macOS hosts
584585
runs-on: macos-12
585586
timeout-minutes: 45
586-
needs: [project, linters, protos, man]
587+
needs: [linters, protos, man]
587588
steps:
588589
- uses: actions/checkout@v3
589590

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
1515

1616
jobs:
1717
CodeQL-Build:
18-
18+
if: github.repository == 'containerd/containerd'
1919
permissions:
2020
actions: read # for github/codeql-action/init to get workflow details
2121
contents: read # for actions/checkout to fetch code

0 commit comments

Comments
 (0)