Skip to content

Self-hosted spotify downloader

TypeScript

ci(github-actions): add automatic ytdl update into github actions

raiper349baf3b9eb7b0
diff --git a/.github/workflows/update-ytdl.yml b/.github/workflows/update-ytdl.yml
new file mode 100644
index 0000000..a16a64a
--- /dev/null
+++ b/.github/workflows/update-ytdl.yml
@@ -0,0 +1,30 @@
+name: update-ytdl
+
+on:
+ workflow_dispatch:
+ branches: ytdl-update-automated
+ schedule:
+ - cron: '0 0 * * *'
+
+jobs:
+ update-ytdl:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set up Node
+ uses: actions/setup-node@v2
+ with:
+ node-version: '18.x'
+ - name: Update @distube/ytdl-core
+ run: npm update @distube/ytdl-core -w backend
+ - name: Commit and create PR
+ uses: peter-evans/create-pull-request@v3
+ with:
+ title: 'build(ytdl): Upgrade ytdl package (automated)'
+ branch: 'ytdl-update-automated'
+ commit-message: 'build(ytdl): Upgrade ytdl package (automated)'
+ - name: Merge ytdl-update-automated PR
+ run: gh pr merge --merge --auto "1"
+ env:
+ GH_TOKEN: ${{ github.token }}