Init2
This commit is contained in:
25
.github/workflows/batch_close_issues.yml
vendored
Normal file
25
.github/workflows/batch_close_issues.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: "Batch close stale issues"
|
||||
|
||||
on:
|
||||
# Monthly
|
||||
schedule:
|
||||
- cron: '0 0 1 * *'
|
||||
# Manual trigger
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Close everything older than a year
|
||||
days-before-issue-stale: 365
|
||||
days-before-issue-close: 0
|
||||
exempt-issue-labels: "do-not-autoclose,Meta request"
|
||||
close-issue-message: "In an effort to have a more manageable issue backlog, we're closing older requests that weren't addressed since there's a low chance of it being addressed if it hasn't already. If your request is still relevant, please [open a new request](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose)."
|
||||
close-issue-reason: not_planned
|
||||
ascending: true
|
||||
operations-per-run: 250
|
||||
157
.github/workflows/build_pull_request.yml
vendored
Normal file
157
.github/workflows/build_pull_request.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
name: PR build check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.github/workflows/issue_moderator.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI_CHUNK_SIZE: 65
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare job
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
|
||||
multisrcMatrix: ${{ steps.generate-matrices.outputs.multisrcMatrix }}
|
||||
isIndividualChanged: ${{ steps.parse-changed-files.outputs.isIndividualChanged }}
|
||||
isMultisrcChanged: ${{ steps.parse-changed-files.outputs.isMultisrcChanged }}
|
||||
env:
|
||||
CI_MODULE_GEN: true
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: adopt
|
||||
|
||||
- id: get-changed-files
|
||||
name: Get changed files
|
||||
uses: Ana06/get-changed-files@v2.2.0
|
||||
|
||||
- id: parse-changed-files
|
||||
name: Parse changed files
|
||||
run: |
|
||||
isIndividualChanged=0
|
||||
isMultisrcChanged=0
|
||||
for changedFile in ${{ steps.get-changed-files.outputs.all }}; do
|
||||
if [[ ${changedFile} == src/* ]]; then
|
||||
isIndividualChanged=1
|
||||
elif [[ ${changedFile} == multisrc/* ]]; then
|
||||
isMultisrcChanged=1
|
||||
elif [[ ${changedFile} == .github/workflows/issue_moderator.yml ]]; then
|
||||
true
|
||||
elif [[ ${changedFile} == *.md ]]; then
|
||||
true
|
||||
else
|
||||
isIndividualChanged=1
|
||||
isMultisrcChanged=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo "isIndividualChanged=$isIndividualChanged" >> $GITHUB_OUTPUT
|
||||
echo "isMultisrcChanged=$isMultisrcChanged" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate multisrc sources
|
||||
if: ${{ steps.parse-changed-files.outputs.isMultisrcChanged == '1' }}
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: :multisrc:generateExtensions
|
||||
|
||||
- name: Get number of modules
|
||||
run: |
|
||||
set -x
|
||||
./gradlew -q projects | grep '.*extensions\:\(individual\|multisrc\)\:.*\:.*' > projects.txt
|
||||
|
||||
echo "NUM_INDIVIDUAL_MODULES=$(cat projects.txt | grep '.*\:individual\:.*' | wc -l)" >> $GITHUB_ENV
|
||||
echo "NUM_MULTISRC_MODULES=$(cat projects.txt | grep '.*\:multisrc\:.*' | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
- id: generate-matrices
|
||||
name: Create output matrices
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES;
|
||||
const numMultisrcModules = process.env.NUM_MULTISRC_MODULES;
|
||||
const chunkSize = process.env.CI_CHUNK_SIZE;
|
||||
|
||||
const numIndividualChunks = Math.ceil(numIndividualModules / chunkSize);
|
||||
const numMultisrcChunks = Math.ceil(numMultisrcModules / chunkSize);
|
||||
|
||||
console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`);
|
||||
console.log(`Multi-source modules: ${numMultisrcModules} (${numMultisrcChunks} chunks of ${chunkSize})`);
|
||||
|
||||
core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] });
|
||||
core.setOutput('multisrcMatrix', { 'chunk': [...Array(numMultisrcChunks).keys()] });
|
||||
|
||||
build_multisrc:
|
||||
name: Build multisrc modules
|
||||
needs: prepare
|
||||
if: ${{ needs.prepare.outputs.isMultisrcChanged == '1' }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.prepare.outputs.multisrcMatrix) }}
|
||||
steps:
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: adopt
|
||||
|
||||
- name: Generate sources from the multi-source library
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MODULE_GEN: "true"
|
||||
with:
|
||||
arguments: :multisrc:generateExtensions
|
||||
cache-read-only: true
|
||||
|
||||
- name: Build extensions (chunk ${{ matrix.chunk }})
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MULTISRC: "true"
|
||||
CI_CHUNK_NUM: ${{ matrix.chunk }}
|
||||
with:
|
||||
arguments: assembleDebug
|
||||
cache-read-only: true
|
||||
|
||||
build_individual:
|
||||
name: Build individual modules
|
||||
needs: prepare
|
||||
if: ${{ needs.prepare.outputs.isIndividualChanged == '1' }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }}
|
||||
steps:
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: adopt
|
||||
|
||||
- name: Build extensions (chunk ${{ matrix.chunk }})
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MULTISRC: "false"
|
||||
CI_CHUNK_NUM: ${{ matrix.chunk }}
|
||||
with:
|
||||
arguments: assembleDebug
|
||||
cache-read-only: true
|
||||
205
.github/workflows/build_push.yml
vendored
Normal file
205
.github/workflows/build_push.yml
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.github/workflows/issue_moderator.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI_CHUNK_SIZE: 65
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare job
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
|
||||
multisrcMatrix: ${{ steps.generate-matrices.outputs.multisrcMatrix }}
|
||||
env:
|
||||
CI_MODULE_GEN: true
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: adopt
|
||||
|
||||
- name: Generate multisrc sources
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: :multisrc:generateExtensions
|
||||
|
||||
- name: Get number of modules
|
||||
run: |
|
||||
set -x
|
||||
./gradlew -q projects | grep '.*extensions\:\(individual\|multisrc\)\:.*\:.*' > projects.txt
|
||||
|
||||
echo "NUM_INDIVIDUAL_MODULES=$(cat projects.txt | grep '.*\:individual\:.*' | wc -l)" >> $GITHUB_ENV
|
||||
echo "NUM_MULTISRC_MODULES=$(cat projects.txt | grep '.*\:multisrc\:.*' | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
- id: generate-matrices
|
||||
name: Create output matrices
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES;
|
||||
const numMultisrcModules = process.env.NUM_MULTISRC_MODULES;
|
||||
const chunkSize = process.env.CI_CHUNK_SIZE;
|
||||
|
||||
const numIndividualChunks = Math.ceil(numIndividualModules / chunkSize);
|
||||
const numMultisrcChunks = Math.ceil(numMultisrcModules / chunkSize);
|
||||
|
||||
console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`);
|
||||
console.log(`Multi-source modules: ${numMultisrcModules} (${numMultisrcChunks} chunks of ${chunkSize})`);
|
||||
|
||||
core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] });
|
||||
core.setOutput('multisrcMatrix', { 'chunk': [...Array(numMultisrcChunks).keys()] });
|
||||
|
||||
build_multisrc:
|
||||
name: Build multisrc modules
|
||||
needs: prepare
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.prepare.outputs.multisrcMatrix) }}
|
||||
steps:
|
||||
- name: Checkout master branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: adopt
|
||||
|
||||
- name: Prepare signing key
|
||||
run: |
|
||||
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
|
||||
|
||||
- name: Generate sources from the multi-source library
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MODULE_GEN: "true"
|
||||
with:
|
||||
arguments: :multisrc:generateExtensions
|
||||
|
||||
- name: Build extensions (chunk ${{ matrix.chunk }})
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MULTISRC: "true"
|
||||
CI_CHUNK_NUM: ${{ matrix.chunk }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
with:
|
||||
arguments: assembleRelease
|
||||
|
||||
- name: Upload APKs (chunk ${{ matrix.chunk }})
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "github.repository == 'Kareadita/priv-tach-extensions'"
|
||||
with:
|
||||
name: "multisrc-apks-${{ matrix.chunk }}"
|
||||
path: "**/*.apk"
|
||||
retention-days: 1
|
||||
|
||||
- name: Clean up CI files
|
||||
run: rm signingkey.jks
|
||||
|
||||
build_individual:
|
||||
name: Build individual modules
|
||||
needs: prepare
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }}
|
||||
steps:
|
||||
- name: Checkout master branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: adopt
|
||||
|
||||
- name: Prepare signing key
|
||||
run: |
|
||||
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
|
||||
|
||||
- name: Build extensions (chunk ${{ matrix.chunk }})
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MULTISRC: "false"
|
||||
CI_CHUNK_NUM: ${{ matrix.chunk }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
with:
|
||||
arguments: assembleRelease
|
||||
|
||||
- name: Upload APKs (chunk ${{ matrix.chunk }})
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "github.repository == 'Kareadita/priv-tach-extensions'"
|
||||
with:
|
||||
name: "individual-apks-${{ matrix.chunk }}"
|
||||
path: "**/*.apk"
|
||||
retention-days: 1
|
||||
|
||||
- name: Clean up CI files
|
||||
run: rm signingkey.jks
|
||||
|
||||
publish_repo:
|
||||
name: Publish repo
|
||||
needs:
|
||||
- build_multisrc
|
||||
- build_individual
|
||||
if: "github.repository == 'Kareadita/priv-tach-extensions'"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download APK artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ~/apk-artifacts
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: adopt
|
||||
|
||||
- name: Checkout master branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
path: master
|
||||
|
||||
- name: Create repo artifacts
|
||||
run: |
|
||||
cd master
|
||||
./.github/scripts/move-apks.sh
|
||||
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/tachiyomiorg/tachiyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
|
||||
curl -L "$INSPECTOR_LINK" -o ./Inspector.jar
|
||||
java -jar ./Inspector.jar "apk" "output.json" "tmp"
|
||||
./.github/scripts/create-repo.sh
|
||||
|
||||
- name: Checkout repo branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: repo
|
||||
path: repo
|
||||
|
||||
- name: Deploy repo
|
||||
run: |
|
||||
cd repo
|
||||
../master/.github/scripts/commit-repo.sh
|
||||
73
.github/workflows/issue_moderator.yml
vendored
Normal file
73
.github/workflows/issue_moderator.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: Issue moderator
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited, reopened]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
autoclose:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Moderate issues
|
||||
uses: tachiyomiorg/issue-moderator-action@v2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
duplicate-label: Duplicate
|
||||
|
||||
duplicate-check-enabled: true
|
||||
duplicate-check-labels: |
|
||||
["Source request", "Domain changed"]
|
||||
|
||||
existing-check-enabled: true
|
||||
existing-check-labels: |
|
||||
["Source request", "Domain changed"]
|
||||
|
||||
auto-close-rules: |
|
||||
[
|
||||
{
|
||||
"type": "body",
|
||||
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
|
||||
"message": "The acknowledgment section was not removed."
|
||||
},
|
||||
{
|
||||
"type": "body",
|
||||
"regex": ".*\\* (Tachiyomi version|Android version|Device): \\?.*",
|
||||
"message": "Requested information in the template was not filled out."
|
||||
},
|
||||
{
|
||||
"type": "title",
|
||||
"regex": ".*(Source name|Short description).*",
|
||||
"message": "You did not fill out the description in the title."
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
"regex": ".*(hq\\s*dragon|manga\\s*host|supermangas|superhentais|union\\s*mangas|yes\\s*mangas|manhuascan|manhwahot|leitor\\.?net|manga\\s*livre|tsuki\\s*mangas|manga\\s*yabu|mangas\\.in|mangas\\.pw|hentaikai|toptoon\\+?|colamanhua|mangadig|hitomi\\.la|copymanga|neox|1manga\\.co|mangafox\\.fun|mangahere\\.onl|mangakakalot\\.fun|manganel(?!o)|mangaonline\\.fun|mangatoday|manga\\.town|onemanga\\.info|koushoku|ksk\\.moe|comikey|leercapitulo|c[uứ]u\\s*truy[eệ]n|day\\s*comics?|reaper\\s*scans|constellar\\s*scans|mode\\s*scanlator|bakai|japscan|izakaya|blackout\\s*comics|anchira).*",
|
||||
"ignoreCase": true,
|
||||
"labels": ["invalid"],
|
||||
"message": "{match} will not be added back as it is too difficult to maintain. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
"regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|knightnoscanlations|mangasy|nartag|xxx\\s*yaoi|luminous|hunters\\s*scan|reset(?:\\s*|-)scan|astra\\s*scans|manga(?:-|\\s*)pro|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?|mhscans|aresmanga|realm ?scans?|mono ?manga|dat(?:\\s*|-)?gar\\s*scan|remangas|moon ?daisy(?: scans?)?).*",
|
||||
"ignoreCase": true,
|
||||
"labels": ["invalid"],
|
||||
"message": "{match} will not be added back as the scanlator team has requested it to be removed. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
"regex": ".*(?:fail(?:ed|ure|s)?|can\\s*(?:no|')?t|(?:not|un).*able|(?<!n[o']?t )blocked by|error) (?:to )?(?:get past|by ?pass|penetrate)?.*cloud ?fl?are.*",
|
||||
"ignoreCase": true,
|
||||
"labels": ["Cloudflare protected"],
|
||||
"message": "Refer to the **Solving Cloudflare issues** section at https://tachiyomi.org/docs/guides/troubleshooting/#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
|
||||
},
|
||||
{
|
||||
"type": "both",
|
||||
"regex": ".*(slime\\s*read).*",
|
||||
"ignoreCase": true,
|
||||
"labels": ["invalid"],
|
||||
"message": "{match} will not be added as they have relations to the Mangá Livre team. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
|
||||
}
|
||||
]
|
||||
auto-close-ignore-label: do-not-autoclose
|
||||
19
.github/workflows/lock.yml
vendored
Normal file
19
.github/workflows/lock.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Lock threads
|
||||
|
||||
on:
|
||||
# Daily
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
# Manual trigger
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v5
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-inactive-days: '2'
|
||||
pr-inactive-days: '2'
|
||||
Reference in New Issue
Block a user