Imported Upstream version 2.27.0
[platform/upstream/git.git] / ci / config / allow-ref.sample
1 #!/bin/sh
2 #
3 # Sample script for enabling/disabling GitHub Actions CI runs on
4 # particular refs. By default, CI is run for all branches pushed to
5 # GitHub. You can override this by dropping the ".sample" from the script,
6 # editing it, committing, and pushing the result to the "ci-config" branch of
7 # your repository:
8 #
9 #   git checkout -b ci-config
10 #   cp allow-ref.sample allow-ref
11 #   $EDITOR allow-ref
12 #   git add allow-ref
13 #   git commit -am "implement my ci preferences"
14 #   git push
15 #
16 # This script will then be run when any refs are pushed to that repository. It
17 # gets the fully qualified refname as the first argument, and should exit with
18 # success only for refs for which you want to run CI.
19
20 case "$1" in
21 # allow one-off tests by pushing to "for-ci" or "for-ci/mybranch"
22 refs/heads/for-ci*) true ;;
23 # always build your integration branch
24 refs/heads/my-integration-branch) true ;;
25 # don't build any other branches or tags
26 *) false ;;
27 esac