var: avoid a segmentation fault when `HOME` is unset
[git.git] / ci / config / allow-ref.sample
blobaf0e076f8a32c964febde8472d4621da1e3130a7
1 #!/bin/sh
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:
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
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.
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