Skip to content

Commit 6d93e71

Browse files
authored
Fix Github actions artifact download script (#127)
* back out release version * git GITHUB_ARTIFACTS outside of GH Actions
1 parent 801e248 commit 6d93e71

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<groupId>com.uber</groupId>
1919
<artifactId>h3</artifactId>
2020
<packaging>jar</packaging>
21-
<version>4.1.0</version>
21+
<version>4.0.3-SNAPSHOT</version>
2222
<name>h3</name>
2323
<url>https://github.com/uber/h3-java</url>
2424
<description>Java bindings for H3, a hierarchical hexagonal geospatial indexing system.</description>
@@ -40,7 +40,7 @@
4040
<connection>scm:git:git://github.com/uber/h3-java.git</connection>
4141
<developerConnection>scm:git:ssh://[email protected]/uber/h3-java.git</developerConnection>
4242
<url>http://github.com/uber/h3-java/tree/master</url>
43-
<tag>v4.1.0</tag>
43+
<tag>HEAD</tag>
4444
</scm>
4545

4646
<developers>

src/main/c/h3-java/pull-from-github.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ GITHUB_ARTIFACTS_RUN=$1
3535
EXTRACT_TO=src/main/resources
3636

3737
if [ -z "$GITHUB_ARTIFACTS_RUN" ]; then
38+
GIT_REVISION=$(git rev-parse HEAD)
3839
mkdir -p target
3940
pushd target
4041

4142
ARTIFACTS_LIST=$(gh api \
4243
-H "Accept: application/vnd.github+json" \
4344
/repos/{owner}/{repo}/actions/artifacts)
4445

45-
echo "downloading artifacts for run $GITHUB_ARTIFACTS_RUN"
46+
echo "downloading artifacts for run $GIT_REVISION"
4647
TO_DOWNLOAD=$(echo "$ARTIFACTS_LIST" \
47-
| jq ".artifacts[] | select(.workflow_run.id == \"$GITHUB_ARTIFACTS_RUN\")")
48+
| jq ".artifacts[] | select(.workflow_run.head_sha == \"$GIT_REVISION\")")
4849

4950
echo $TO_DOWNLOAD | jq -c '.' | while read artifactline; do
5051
ARTIFACT_NAME=$(echo $artifactline | jq -r .name)

0 commit comments

Comments
 (0)