Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Alpine build #2

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,31 @@ jobs:
needs: build

steps:
# Without installing Git here the checkout has no .git directory on Alpine
- name: Install dependencies
if: matrix.os == 'alpine'
run: |
apk update
apk add --no-cache git

- name: Checkout project sources
uses: actions/checkout@v4
with:
fetch-depth: 0

# Without this the directory is not marked as safe on Alpine
- if: matrix.os == 'alpine'
name: Mark as safe directory
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Set up JDK
if: matrix.os != 'alpine'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Install dependencies
if: matrix.os == 'alpine'
run: |
apk update
apk add --no-cache git udev

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
Expand Down
6 changes: 1 addition & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fun toMavenVersion(gitVersion: String): Pair<String, Boolean> {

val (mavenVersion, snapshot) = toMavenVersion(git.version.get())

println("Publishing version $mavenVersion to ${if (snapshot) "snapshot" else "release"} repository (Git version: ${git.version.get()})")
println("Building version $mavenVersion to ${if (snapshot) "snapshot" else "release"} repository (Git version: ${git.version.get()})")

publishing {
repositories {
Expand All @@ -155,10 +155,6 @@ publishing {
val artifactoryUsername = providers.environmentVariable("ORG_GRADLE_PROJECT_publishUserName").orNull
val artifactoryPassword = providers.environmentVariable("ORG_GRADLE_PROJECT_publishApiKey").orNull

println("Artifactory URL: $artifactoryUrl")
println("Artifactory Username: $artifactoryUsername")
println("Artifactory Password: ${artifactoryPassword?.replace(".", "*")}")

name = "remote"
val libsType = if (snapshot) "snapshots" else "releases"
url = uri("${artifactoryUrl}/libs-${libsType}-local")
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
org.gradle.caching=true
org.gradle.configuration-cache=true