Skip to content

Commit bf78b55

Browse files
author
Vladimir Kotal
committed
pass Github metadata as env variables
1 parent e86ee38 commit bf78b55

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
- name: Before build actions
2525
run: ./dev/before
2626
- name: Build
27+
env:
28+
OPENGROK_REPO_SLUG: ${{ github.repository }}
29+
OPENGROK_REF: ${{ github.ref }}
2730
run: ./dev/main
2831
macos:
2932
name: macOS with Java 11
@@ -46,6 +49,9 @@ jobs:
4649
- name: Before build actions
4750
run: ./dev/before
4851
- name: Build
52+
env:
53+
OPENGROK_REPO_SLUG: ${{ github.repository }}
54+
OPENGROK_REF: ${{ github.ref }}
4955
run: ./dev/main
5056
windows:
5157
name: Windows with Java 11

dev/main

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
# for their fork. Avoid it also for release builds as that can fail such
66
# build unnecessarily.
77
#
8+
9+
if [[ -n $OPENGROK_REF && $OPENGROK_REF == refs/heads/* ]]; then
10+
OPENGROK_BRANCH=${OPENGROK_REF#"refs/heads/"}
11+
fi
12+
813
extra_args=""
9-
if [[ "x$TRAVIS_REPO_SLUG" == "xoracle/opengrok" && "x$TRAVIS_BRANCH" == "xmaster" ]]; then
14+
if [[ "x$OPENGROK_REPO_SLUG" == "xoracle/opengrok" && "x$OPENGROK_BRANCH" == "xmaster" ]]; then
1015
echo "Enabling Coveralls"
1116
extra_args="jacoco:report coveralls:report"
1217

0 commit comments

Comments
 (0)