Maintenance Tasks Fixed

This commit is contained in:
shabinder 2021-05-18 20:36:30 +05:30
parent 62e110b8c6
commit 17ea75d007
5 changed files with 6 additions and 10 deletions

View File

@ -7,7 +7,7 @@ on:
jobs:
build:
name: Test and Build
name: Maintenance Time
runs-on: ubuntu-latest
steps:
@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v2.3.1
# Run Maintenance Tasks
- name: Android App
- name: Maintenance Run
run: ./gradlew :maintenance-tasks:run
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

View File

@ -27,11 +27,6 @@ android {
targetSdkVersion(Versions.targetSdkVersion)
}
/*composeOptions {
kotlinCompilerExtensionVersion = Versions.compose
kotlinCompilerVersion = Versions.kotlinVersion
}*/
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

View File

@ -1,6 +1,7 @@
plugins {
kotlin("jvm")
kotlin("plugin.serialization")
id("ktlint-setup")
application
}

View File

@ -6,7 +6,7 @@ import utils.byProperty
internal object Common {
const val GITHUB_API = "https://api.github.com"
val GITHUB_TOKEN get() = "GITHUB_TOKEN".byProperty
val GH_TOKEN get() = "GH_TOKEN".byProperty
fun START_SECTION(tagName: String = "HTI") = "<!--START_SECTION:$tagName-->"
fun END_SECTION(tagName: String = "HTI") = "<!--END_SECTION:$tagName-->"
const val USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0"

View File

@ -9,7 +9,7 @@ internal fun updateAnalyticsImage() {
runBlocking {
val oldGithubFile = GithubService.getGithubFileContent(
token = Common.GITHUB_TOKEN,
token = Common.GH_TOKEN,
ownerName = secrets.ownerName,
repoName = secrets.repoName,
branchName = secrets.branchName,
@ -43,7 +43,7 @@ internal fun updateAnalyticsImage() {
// debug("Updated File Content:\n$updatedContent")
val updationResponse = GithubService.updateGithubFileContent(
token = Common.GITHUB_TOKEN,
token = Common.GH_TOKEN,
ownerName = secrets.ownerName,
repoName = secrets.repoName,
branchName = secrets.branchName,