Skip to content

Commit

Permalink
CI: skip some jobs when repo != containerd/containerd
Browse files Browse the repository at this point in the history
For running CI in a non-upstream repo

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit fe0116e)
> Conflicts:
>	.github/workflows/codeql.yml
>	.github/workflows/fuzz.yml
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Feb 10, 2023
1 parent 839086b commit 664a938
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Expand Up @@ -56,6 +56,7 @@ jobs:
#
project:
name: Project Checks
if: github.repository == 'containerd/containerd'
runs-on: ubuntu-20.04
timeout-minutes: 5

Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
# Make sure binaries compile with other platforms
crossbuild:
name: Crossbuild Binaries
needs: [project, linters, protos, man]
needs: [linters, protos, man]
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
Expand Down Expand Up @@ -227,7 +228,7 @@ jobs:
name: Binaries
runs-on: ${{ matrix.os }}
timeout-minutes: 10
needs: [project, linters, protos, man]
needs: [linters, protos, man]

strategy:
matrix:
Expand Down Expand Up @@ -267,7 +268,7 @@ jobs:
name: Windows Integration
runs-on: ${{ matrix.os }}
timeout-minutes: 35
needs: [project, linters, protos, man]
needs: [linters, protos, man]
env:
GOTEST: gotestsum --

Expand Down Expand Up @@ -356,7 +357,7 @@ jobs:
name: Linux Integration
runs-on: ubuntu-20.04
timeout-minutes: 40
needs: [project, linters, protos, man]
needs: [linters, protos, man]

strategy:
fail-fast: false
Expand Down Expand Up @@ -486,7 +487,7 @@ jobs:
name: MacOS unit tests
runs-on: macos-12
timeout-minutes: 10
needs: [project, linters, protos, man]
needs: [linters, protos, man]
env:
GOTEST: gotestsum --

Expand All @@ -512,7 +513,7 @@ jobs:
# nested virtualization is only available on macOS hosts
runs-on: macos-12
timeout-minutes: 45
needs: [project, linters, protos, man]
needs: [linters, protos, man]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -583,7 +584,7 @@ jobs:
# nested virtualization is only available on macOS hosts
runs-on: macos-12
timeout-minutes: 45
needs: [project, linters, protos, man]
needs: [linters, protos, man]
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Expand Up @@ -15,7 +15,7 @@ permissions: # added using https://github.com/step-security/secure-workflows

jobs:
CodeQL-Build:

if: github.repository == 'containerd/containerd'
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
Expand Down

0 comments on commit 664a938

Please sign in to comment.