Skip to content

Commit 191ba3c

Browse files
committed
Download latest SNAPSHOT from github
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
1 parent 21d0b9d commit 191ba3c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
working-directory: flink-dockerfile-example
5151
run: |
5252
DOCKER_TAG=$DOCKER_REPO:${{ env.VERSION }}-sqrl${{ matrix.SQRL_VERSION }}
53-
docker build --build-arg SQRL_VERSION=${{ matrix.SQRL_VERSION }} -t $DOCKER_TAG .
53+
docker build --build-arg SQRL_VERSION=${{ matrix.SQRL_VERSION }} --build-arg GITHUB_ACTOR=${{ github.actor }} --build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} -t $DOCKER_TAG .
5454
5555
- name: Push Docker image
5656
if: github.event_name == 'release' && github.event.action == 'created'

flink-dockerfile-example/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
FROM gradle:8.6-jdk11 AS build
1818

1919
ARG SQRL_VERSION="v0.5.7"
20+
ARG GITHUB_ACTOR
21+
ARG GITHUB_TOKEN
22+
23+
ENV GITHUB_ACTOR=${GITHUB_ACTOR}
24+
ENV GITHUB_TOKEN=${GITHUB_TOKEN}
2025

2126
WORKDIR /app
2227

flink-dockerfile-example/build.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ ext {
2727
flinkVersion = "1.19.1"
2828
jdbcVersion = "3.2.0-1.19"
2929
kafkaVersion = "3.2.0-1.19"
30-
sqrlVersion = System.getenv('SQRL_VERSION')?.replaceFirst('^v', '')
3130
icebergVersion = "1.6.0"
31+
sqrlVersion = System.getenv('SQRL_VERSION')?.replaceFirst('^v', '') ?: 'dev'
32+
}
33+
34+
// Logic to fetch the latest snapshot version if sqrlVersion is 'dev'
35+
if (sqrlVersion == 'dev') {
36+
sqrlVersion = '0.5.10-SNAPSHOT'
3237
}
3338

3439
repositories {
@@ -37,6 +42,13 @@ repositories {
3742
maven {
3843
url "https://packages.confluent.io/maven/"
3944
}
45+
maven {
46+
url "https://maven.pkg.github.com/DataSQRL/sqrl"
47+
credentials {
48+
username = System.getenv("GITHUB_ACTOR")
49+
password = System.getenv("GITHUB_TOKEN")
50+
}
51+
}
4052
}
4153

4254
dependencies {

0 commit comments

Comments
 (0)