-
Notifications
You must be signed in to change notification settings - Fork 7
/
sourcehut.yml
33 lines (30 loc) · 939 Bytes
/
sourcehut.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
image: ubuntu/20.04
sources:
- https://github.com/ysoftwareab/yplatform.git
tasks:
- script: |
export YP_CI_BREW_INSTALL=minimal
export YP_LOG_BOOTSTRAP=true
export YP_PRINTENV_BOOTSTRAP=true
set -euo pipefail
if [[ "${BUILD_REASON}" = "github-pr" ]]; then
export GITHUB_REF=refs/pull/${GITHUB_PR_NUMBER}/merge
fi
if [[ "${GITHUB_REF:-}" =~ ^refs/heads/sourcehut ]]; then
true
elif [[ "${GITHUB_REF:-}" = "refs/heads/master" ]]; then
true
elif [[ "${GITHUB_REF:-}" =~ ^refs/pull/ ]]; then
true
else
# skip
exit 0
fi
# use github-checkout to checkout correct ref
mkdir run
GITHUB_REPOSITORY=${GITHUB_REPO:-${GITHUB_BASE_REPO:-}} \
GITHUB_EVENT_NAME=${GITHUB_EVENT:-} \
GITHUB_WORKSPACE=$(pwd)/run \
yplatform/bin/github-checkout
cd run
source ci/pipeline.script.sh