Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# 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/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
interval: 'daily'
allow:
- dependency-name: '@distube/ytdl-core'
- dependency-name: '@distube/ytsr'
- dependency-name: 'youtube-dl-exec'
32 changes: 32 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Dependabot auto-approve and merge

on: pull_request_target

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

- name: Approve PR
if: ${{contains(steps.metadata.outputs.dependency-names, '@distube/ytdl-core') || contains(steps.metadata.outputs.dependency-names, '@distube/ytsr') || contains(steps.metadata.outputs.dependency-names, 'youtube-dl-exec')}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
if: ${{contains(steps.metadata.outputs.dependency-names, '@distube/ytdl-core') || contains(steps.metadata.outputs.dependency-names, '@distube/ytsr') || contains(steps.metadata.outputs.dependency-names, 'youtube-dl-exec')}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
42 changes: 42 additions & 0 deletions .github/workflows/dependabot_post_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Post-Dependabot Merge

on:
push:
branches:
- master

jobs:
check_for_dependabot_changes:
runs-on: ubuntu-latest
outputs:
is_dependabot_merge: ${{ steps.check_author.outputs.is_dependabot_merge }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Check if commit is from Dependabot
id: check_author
run: |
AUTHOR=$(git log -1 --pretty=format:'%an')
echo "Commit author: $AUTHOR"
if [[ "$AUTHOR" == "dependabot[bot]" ]]; then
echo "is_dependabot_merge=true" >> $GITHUB_OUTPUT
else
echo "is_dependabot_merge=false" >> $GITHUB_OUTPUT
fi

trigger_release:
Comment on lines +10 to +30

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
needs: check_for_dependabot_changes
if: needs.check_for_dependabot_changes.outputs.is_dependabot_merge == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Trigger release workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: trigger-release-pipeline
Comment on lines +31 to +42

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- release
repository_dispatch:
types: [trigger-release-pipeline]
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
logs*
mongo*
dist
```
*player-script.js
52 changes: 49 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# StroyCord

_Previously JE REVIENS OF DEVILKING_
Since the recent action of youtube to close the most used bots on discord, I wanted to create my own.

---

## How to use it ?
Expand Down Expand Up @@ -76,3 +73,52 @@ You can now launch it with the command:
| -------------------------- | -------- | ------------ | -------------------- | ------------------------------------------ |
| LOG_DIR | FALSE | /log | TRUE | string - Your logging directory path use for docker |
| TIMEZONE | FALSE | Europe/Paris | TRUE | string - Your container timezone |


---


#### Docker compose configuration

```yaml
services:
stroycord:
container_name: stroycord
image: destcom/stroycord:latest
build:
context: .
dockerfile: StroyCord.Dockerfile
environment:
DISCORD_TOKEN: ${DISCORD_TOKEN}
DISCORD_CLIENT_ID: ${DISCORD_CLIENT_ID}
PREFIX: ${PREFIX}
LANGUAGE: ${LANGUAGE}
LOG_DIR: ${LOG_DIR:-./logs}
TIMEZONE: ${TIMEZONE:-Europe/Paris}
DATABASE_CONNECTION_STRING: ${DATABASE_CONNECTION_STRING}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_NAME: ${DATABASE_NAME}
restart: on-failure
volumes:
- ${LOG_DIR:-./logs}:/app/logs
networks:
- default
depends_on:
- mongodb
mongodb:
container_name: mongodb
image: mongo:latest
restart: on-failure
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-root}
ports:
- ${MONGO_PORT:-27017}:27017
volumes:
- ${MONGO_DATA_DIR:-./mongo/data/db}:/data/db
networks:
- default
```

_This repo was previously JE REVIENS OF DEVILKING_
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
stroycord:
container_name: stroycord
Expand Down
Loading