diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index fc12e4c..83a91c3 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,8 +1,7 @@ name: Docker -on: - push: - branches: - - master + +on: [push] + jobs: publishing: runs-on: ubuntu-latest @@ -12,6 +11,14 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Rewrite version + run: | + branch="`echo "${{ github.ref }}" | grep -o "[^/]*$"`" + if [[ "$branch" != "master" ]]; then + cat gradle.properties | sed -e "s/^version=\([0-9\.]*\)/version=\1-branch_$branch-build${{ github.run_number }}/" > gradle.properties.tmp + rm gradle.properties + mv gradle.properties.tmp gradle.properties + fi - name: Log into registry uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c with: diff --git a/common/src/commonMain/kotlin/DateTimeSerializer.kt b/common/src/commonMain/kotlin/DateTimeSerializer.kt index 13c701e..a4a3ec4 100644 --- a/common/src/commonMain/kotlin/DateTimeSerializer.kt +++ b/common/src/commonMain/kotlin/DateTimeSerializer.kt @@ -8,7 +8,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder -@Serializer(DateTime::class) object DateTimeSerializer : KSerializer { override val descriptor: SerialDescriptor = Double.serializer().descriptor override fun deserialize(decoder: Decoder): DateTime = DateTime(decoder.decodeDouble()) diff --git a/gradle.properties b/gradle.properties index 426d004..5c07492 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,4 +10,4 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.0.10 +version=0.1.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 96122e2..9d06886 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,17 +1,17 @@ [versions] -kotlin = "1.7.22" -kotlin-serialization = "1.4.1" +kotlin = "1.8.10" +kotlin-serialization = "1.5.0" -plagubot = "3.5.0" -tgbotapi = "5.2.1" -microutils = "0.16.11" -kslog = "0.5.4" -krontab = "0.8.5" -tgbotapi-libraries = "0.8.2" -plagubot-plugins = "0.8.1" +plagubot = "5.0.0" +tgbotapi = "7.0.0" +microutils = "0.17.5" +kslog = "1.0.0" +krontab = "0.9.0" +tgbotapi-libraries = "0.10.0" +plagubot-plugins = "0.10.0" -dokka = "1.7.20" +dokka = "1.8.10" psql = "42.5.0" diff --git a/posts_registrar/src/jvmMain/kotlin/Plugin.kt b/posts_registrar/src/jvmMain/kotlin/Plugin.kt index 028e185..ecdf6d7 100644 --- a/posts_registrar/src/jvmMain/kotlin/Plugin.kt +++ b/posts_registrar/src/jvmMain/kotlin/Plugin.kt @@ -21,7 +21,6 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.* import dev.inmo.tgbotapi.extensions.utils.extensions.raw.text import dev.inmo.tgbotapi.extensions.utils.extensions.sameChat import dev.inmo.tgbotapi.extensions.utils.extensions.sameMessage -import dev.inmo.tgbotapi.extensions.utils.formatting.buildEntities import dev.inmo.tgbotapi.extensions.utils.textContentOrNull import dev.inmo.tgbotapi.extensions.utils.types.buttons.* import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage diff --git a/runner/Dockerfile b/runner/Dockerfile index 04ac022..13a7085 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -1,4 +1,4 @@ -FROM adoptopenjdk/openjdk11 +FROM bellsoft/liberica-openjdk-alpine:19 USER 1000 diff --git a/runner/deploy.sh b/runner/deploy.sh index c99bb32..0c68c50 100755 --- a/runner/deploy.sh +++ b/runner/deploy.sh @@ -14,7 +14,7 @@ function assert_success() { } app=plaguposter -version="`grep ../gradle.properties -e "^version=" | grep -e "[0-9.]*" -o`" +version="`grep ../gradle.properties -e "^version=" | sed -e "s/version=\(.*\)/\1/"`" server=docker.io/insanusmokrassar assert_success ../gradlew build diff --git a/runner/nonsudo_deploy.sh b/runner/nonsudo_deploy.sh index e97a37a..472afd0 100755 --- a/runner/nonsudo_deploy.sh +++ b/runner/nonsudo_deploy.sh @@ -14,7 +14,7 @@ function assert_success() { } app=plaguposter -version="`grep ../gradle.properties -e "^version=" | grep -e "[0-9.]*" -o`" +version="`grep ../gradle.properties -e "^version=" | sed -e "s/version=\(.*\)/\1/"`" server=insanusmokrassar assert_success ../gradlew build