@@ -4,12 +4,8 @@ on:
pull_request:
push:
branches:
- - maint
- - master
- - next
- - jch
- - pu
- - 'for-ci**'
+ - '**'
+ - '!**wip**'
tags:
- '**'
- '!**wip**'
@@ -19,6 +15,15 @@ env:
jobs:
windows-build:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
@@ -43,6 +48,15 @@ jobs:
name: windows-artifacts
path: artifacts
windows-test:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
runs-on: windows-latest
needs: [windows-build]
strategy:
@@ -82,6 +96,15 @@ jobs:
name: failed-tests-windows
path: ${{env.FAILED_TEST_ARTIFACTS}}
vs-build:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
env:
MSYSTEM: MINGW64
NO_PERL: 1
@@ -130,6 +153,15 @@ jobs:
name: vs-artifacts
path: artifacts
vs-test:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
runs-on: windows-latest
needs: [vs-build]
strategy:
@@ -166,6 +198,15 @@ jobs:
${{matrix.nr}} 10 t[0-9]*.sh)
"@
regular:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
strategy:
matrix:
vector:
@@ -201,6 +242,15 @@ jobs:
name: failed-tests-${{matrix.vector.jobname}}
path: ${{env.FAILED_TEST_ARTIFACTS}}
dockerized:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
strategy:
matrix:
vector:
@@ -225,6 +275,15 @@ jobs:
name: failed-tests-${{matrix.vector.jobname}}
path: ${{env.FAILED_TEST_ARTIFACTS}}
static-analysis:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
env:
jobname: StaticAnalysis
runs-on: ubuntu-latest
@@ -233,6 +292,15 @@ jobs:
- run: ci/install-dependencies.sh
- run: ci/run-static-analysis.sh
documentation:
+ if: >-
+ ${{
+ (github.repository_owner != 'git' && github.repository_owner != 'gitster') ||
+ github.ref == 'refs/heads/maint' ||
+ github.ref == 'refs/heads/master' ||
+ github.ref == 'refs/heads/next' ||
+ github.ref == 'refs/heads/jch' ||
+ github.ref == 'refs/heads/pu'
+ }}
env:
jobname: Documentation
runs-on: ubuntu-latest
@@ -79,8 +79,8 @@ test your changes on Linux, Mac (and hopefully soon Windows). See
GitHub-Travis CI hints section for details.
Alternately, you can use GitHub Actions (which supports testing your changes
-on Linux, macOS, and Windows) by pushing into a branch whose name starts
-with "for-ci", or a tag whose name doesn't have `wip`,
+on Linux, macOS, and Windows) by pushing into a branch or tag
+whose name doesn't have `wip`,
or opening a GitHub's Pull Request against
https://github.com/git/git.git or a fork of that repository.
Here is the patch to for discussion. Should we want to enable GitHub Action for all repo-s, except git/git and gitster/git. We'll want to have this patch fix-up to the previous one. With this patch merged, contributors will need to opt-out by push to a branch/tag with "wip" anywhere in the refname. Note that, integration branches (maint, master, next, jch, pu) will always be built, regardless of repo. Since the current condition is ugly enough, and I find it's very hard to wrap my head around those condition. Should this patch get fixing up into previous one, please remove the second paragraph in the body of previous patch. Thanks. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> --- .github/workflows/main.yml | 80 ++++++++++++++++++++++++++++++--- Documentation/SubmittingPatches | 4 +- 2 files changed, 76 insertions(+), 8 deletions(-)