diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..816be658 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +.idea +.gradle +.kotlin +build +SCPToolsBot +.gitignore +CODE_OF_CONDUCT.md +gradlew.bat +installer.sh +LICENSE +README.md +settings.gradle.kts \ No newline at end of file diff --git a/.env b/.env new file mode 100644 index 00000000..8e18bee1 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +CONFIG_PATH="/var/lib/ScpTools/" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..44f0ed01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: Vxrpenter + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] +- Installation: [e.g. Source, Docker, Installer, Manual] + - Bot Version [e.g. 1.1.0] + - Java Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..f069b4dc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,34 @@ + +## Etiquette +- [ ] Did you check the contribution guidelines? +- [ ] Does this request not already exist in another form? + +## Changes +- [ ] Bugfix +- [ ] Feature +- [ ] Behavior Change +- [ ] Configuration +- [ ] Other: ____ + +## Tested +- [ ] Completely +- [ ] Mostly +- [ ] Partly +- [ ] Nothing + +## Description + +Replace this text with the description of your changes diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..9eea8b2c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "gradle" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..64ca0e98 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,22 @@ +# .github/release.yml + +changelog: + categories: + - title: ⛔ Breaking Changes ⛔ + labels: + - breaking + - title: Added + labels: + - feature + - title: Changed + labels: + - enhancement + - title: Fixed + labels: + - bugfix + - title: Dependencies + labels: + - dependencies + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..62524ab2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Verify build + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Set up JDK 22 + uses: actions/setup-java@v4 + with: + java-version: '22' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build with Gradle Wrapper + run: ./gradlew shadowjar --no-daemon diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 00000000..0fb4b061 --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,23 @@ +name: Upload Dependencies + +on: + push: + branches: + - master + +jobs: + dependency-submission: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Set up JDK 22 + uses: actions/setup-java@v4 + with: + java-version: '22' + distribution: 'temurin' + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..eb3e78c3 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,48 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Check out sources + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: vxrpenter/scptoolsbot + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v2 + with: + subject-name: index.docker.io/vxrpenter/scptoolsbot + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true + diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..b62e5753 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 00000000..3d9d9a19 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,15 @@ + + + + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:$PROJECT_DIR$/SCPToolsBot/database/data.db + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 00000000..d8e95616 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 00000000..a211b5ac --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index f844f8c9..73d73ff6 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,10 +5,11 @@