Commit 39e626a 1 parent 78229d9 commit 39e626a Copy full SHA for 39e626a
File tree 4 files changed +20
-17
lines changed
4 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,6 @@ jobs:
195
195
196
196
- name : Download and test
197
197
run : |
198
- mvn clean test -Dh3.github.artifacts.use=true -Dh3.github.artifacts.ref =${{ github.sha }}
198
+ mvn clean test -Dh3.github.artifacts.use=true -Dh3.github.artifacts.by_run =${{ github.run_id }}
199
199
env :
200
200
GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 73
73
<h3 .system.prune>false</h3 .system.prune>
74
74
<h3 .dockcross.tag>20210624-de7b1b0</h3 .dockcross.tag>
75
75
<h3 .github.artifacts.use>false</h3 .github.artifacts.use>
76
- <h3 .github.artifacts.ref />
76
+ <h3 .github.artifacts.by_run />
77
77
<!-- Used for passing additional arguments to surefire when using JaCoCo -->
78
78
<h3 .additional.argLine />
79
79
271
271
<argument >${h3.system.prune} </argument >
272
272
<argument >${h3.dockcross.tag} </argument >
273
273
<argument >${h3.github.artifacts.use} </argument >
274
- <argument >${h3.github.artifacts.ref } </argument >
274
+ <argument >${h3.github.artifacts.by_run } </argument >
275
275
</arguments >
276
276
</configuration >
277
277
</execution >
Original file line number Diff line number Diff line change 28
28
# github-artifacts - When set, all build artifacts are retrieved from Github
29
29
# Actions artifacts rather than built locally (overrides
30
30
# all other settings.)
31
- # github-artifacts-ref - When set, override the default revision to pull artifacts from
31
+ # github-artifacts-run - When set, override the default revision to pull artifacts from
32
32
# for `github-artifacts`.
33
33
#
34
34
# This script downloads H3, builds H3 and the H3-Java native library, and
@@ -45,10 +45,10 @@ USE_DOCKER=$3
45
45
SYSTEM_PRUNE=$4
46
46
DOCKCROSS_TAG=$5
47
47
GITHUB_ARTIFACTS=$6
48
- GITHUB_ARTIFACTS_REF =$7
48
+ GITHUB_ARTIFACTS_RUN =$7
49
49
50
50
if $GITHUB_ARTIFACTS ; then
51
- src/main/c/h3-java/pull-from-github.sh " $GITHUB_ARTIFACTS_REF "
51
+ src/main/c/h3-java/pull-from-github.sh " $GITHUB_ARTIFACTS_RUN "
52
52
# The build of the library below is still needed for the binding-functions file
53
53
fi
54
54
Original file line number Diff line number Diff line change 24
24
25
25
set -eox pipefail
26
26
27
- GITHUB_ARTIFACTS_REF =$1
27
+ GITHUB_ARTIFACTS_RUN =$1
28
28
29
- if [ -z " $GITHUB_ARTIFACTS_REF " ]; then
30
- GIT_REVISION=$( git rev-parse HEAD)
31
- else
32
- GIT_REVISION=" $GITHUB_ARTIFACTS_REF "
33
- fi
34
29
EXTRACT_TO=src/main/resources
35
30
36
- echo downloading artifacts for $GIT_REVISION
37
-
38
31
mkdir -p target
39
32
pushd target
40
33
41
- TO_DOWNLOAD =$( gh api \
34
+ ARTIFACTS_LIST =$( gh api \
42
35
-H " Accept: application/vnd.github+json" \
43
- /repos/{owner}/{repo}/actions/artifacts \
44
- | jq " .artifacts[] | select(.workflow_run.head_sha == \" $GIT_REVISION \" )" )
36
+ /repos/{owner}/{repo}/actions/artifacts)
37
+
38
+ if [ -z " $GITHUB_ARTIFACTS_RUN " ]; then
39
+ GIT_REVISION=$( git rev-parse HEAD)
40
+ echo " downloading artifacts for sha $GIT_REVISION "
41
+ TO_DOWNLOAD=$( echo " $ARTIFACTS_LIST " \
42
+ | jq " .artifacts[] | select(.workflow_run.head_sha == \" $GIT_REVISION \" )" )
43
+ else
44
+ echo " downloading artifacts for run $GITHUB_ARTIFACTS_RUN "
45
+ TO_DOWNLOAD=$( echo " $ARTIFACTS_LIST " \
46
+ | jq " .artifacts[] | select(.workflow_run.id == \" $GITHUB_ARTIFACTS_RUN \" )" )
47
+ fi
45
48
46
49
echo $TO_DOWNLOAD | jq -c ' .' | while read artifactline; do
47
50
ARTIFACT_NAME=$( echo $artifactline | jq -r .name)
You can’t perform that action at this time.
0 commit comments