mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 02:01:02 -05:00
Automatically handle Java dependencies updates (#4891)
* Automatically handle Java dependencies updates * Fix commands * Fix commands * Fix paths * Copy deps
This commit is contained in:
parent
b11b2ff58d
commit
3d4a31240f
6 changed files with 43 additions and 3 deletions
12
.github/dependabot.yml
vendored
12
.github/dependabot.yml
vendored
|
@ -37,3 +37,15 @@ updates:
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
|
# Maintain dependencies for Java
|
||||||
|
- package-ecosystem: "gradle"
|
||||||
|
directory: "/dependencies/checkstyle"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: "gradle"
|
||||||
|
directory: "/dependencies/google-java-format"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
|
|
@ -34,12 +34,10 @@ FROM python:3.11.5-alpine3.17 as base_image
|
||||||
################################
|
################################
|
||||||
# Set ARG values used in Build #
|
# Set ARG values used in Build #
|
||||||
################################
|
################################
|
||||||
ARG CHECKSTYLE_VERSION='10.3.4'
|
|
||||||
ARG CLJ_KONDO_VERSION='2023.05.18'
|
ARG CLJ_KONDO_VERSION='2023.05.18'
|
||||||
# Dart Linter
|
# Dart Linter
|
||||||
## stable dart sdk: https://dart.dev/get-dart#release-channels
|
## stable dart sdk: https://dart.dev/get-dart#release-channels
|
||||||
ARG DART_VERSION='2.8.4'
|
ARG DART_VERSION='2.8.4'
|
||||||
ARG GOOGLE_JAVA_FORMAT_VERSION='1.18.1'
|
|
||||||
## install alpine-pkg-glibc (glibc compatibility layer package for Alpine Linux)
|
## install alpine-pkg-glibc (glibc compatibility layer package for Alpine Linux)
|
||||||
ARG GLIBC_VERSION='2.34-r0'
|
ARG GLIBC_VERSION='2.34-r0'
|
||||||
ARG KTLINT_VERSION='0.47.1'
|
ARG KTLINT_VERSION='0.47.1'
|
||||||
|
@ -94,7 +92,7 @@ RUN apk add --no-cache \
|
||||||
########################################
|
########################################
|
||||||
# Copy dependencies files to container #
|
# Copy dependencies files to container #
|
||||||
########################################
|
########################################
|
||||||
COPY dependencies/* /
|
COPY dependencies/ /
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
# Install Dependencies #
|
# Install Dependencies #
|
||||||
|
|
12
dependencies/checkstyle/build.gradle
vendored
Normal file
12
dependencies/checkstyle/build.gradle
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hold this dependency here so we can get automated updates using DependaBot
|
||||||
|
dependencies {
|
||||||
|
implementation 'com.puppycrawl.tools:checkstyle:10.3.4'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'com.github.super-linter'
|
||||||
|
version '1.0.0-SNAPSHOT'
|
12
dependencies/google-java-format/build.gradle
vendored
Normal file
12
dependencies/google-java-format/build.gradle
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hold this dependency here so we can get automated updates using DependaBot
|
||||||
|
dependencies {
|
||||||
|
implementation 'com.google.googlejavaformat:google-java-format:1.18.1'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'com.github.super-linter'
|
||||||
|
version '1.0.0-SNAPSHOT'
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
CHECKSTYLE_VERSION="$(grep <"checkstyle/build.gradle" "checkstyle" | awk -F ':' '{print $3}' | tr -d "'")"
|
||||||
|
echo "Installing Checkstyle: ${CHECKSTYLE_VERSION}"
|
||||||
|
|
||||||
url=$(curl -s \
|
url=$(curl -s \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \
|
-H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
GOOGLE_JAVA_FORMAT_VERSION="$(grep <"google-java-format/build.gradle" "google-java-format" | awk -F ':' '{print $3}' | tr -d "'")"
|
||||||
|
echo "Installing Google Java Format: ${GOOGLE_JAVA_FORMAT_VERSION}"
|
||||||
|
|
||||||
url=$(curl -s \
|
url=$(curl -s \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \
|
-H "Authorization: Bearer $(cat /run/secrets/GITHUB_TOKEN)" \
|
||||||
|
|
Loading…
Reference in a new issue