aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2021-03-14 20:46:22 +0200
committerAlex Shnitman <alexta69@gmail.com>2021-03-14 22:02:50 +0200
commitb8285c0b8eceb6fe58a922fba3f441304d033b9c (patch)
tree7a35a4494936692097186e4760b9131c7a00e66f /.github
parentupgrade dependencies (diff)
downloadmetube-b8285c0b8eceb6fe58a922fba3f441304d033b9c.tar.gz
metube-b8285c0b8eceb6fe58a922fba3f441304d033b9c.tar.bz2
metube-b8285c0b8eceb6fe58a922fba3f441304d033b9c.zip
add youtube-dl upgrade action
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-youtube-dl.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/update-youtube-dl.yml b/.github/workflows/update-youtube-dl.yml
new file mode 100644
index 0000000..4c23b2a
--- /dev/null
+++ b/.github/workflows/update-youtube-dl.yml
@@ -0,0 +1,34 @@
+name: update-youtube-dl
+
+on:
+ schedule:
+ - cron: '0 0 * * *'
+
+jobs:
+ update-youtube-dl :
+ runs-on: ubuntu-latest
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@v2
+ with:
+ token: ${{ secrets.AUTOUPDATE_PAT }}
+ -
+ name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.8'
+ -
+ name: Update youtube-dl
+ run: |
+ pip install pipenv
+ pipenv sync
+ VER=`pipenv run pip list -o | awk '$1 == "youtube-dl" {print $3}'`
+ if [ -n "$VER" ]; then
+ pipenv update --selective-upgrade youtube-dl
+ git config --global user.email "updater@metube"
+ git config --global user.name "AutoUpdater"
+ git add Pipfile.lock
+ git commit -m 'upgraded youtube-dl'
+ git push
+ fi
bgstack15