ci(github-actions): add automatic ytdl update into github actions
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
name: Auto-merge Github Actions
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
automerge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event.pull_request.head.ref == 'ytdl-update-automated'
|
|
||||||
steps:
|
|
||||||
- uses: peter-evans/enable-pull-request-automerge@v3
|
|
||||||
with:
|
|
||||||
pull-request-number: ${{ github.event.pull_request.number }}
|
|
||||||
@@ -18,13 +18,18 @@ jobs:
|
|||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '18.x'
|
node-version: '18.x'
|
||||||
- name: Update @distube/ytdl-core
|
- name: Update @distube/ytdl-core and release
|
||||||
run: npm update @distube/ytdl-core -w backend
|
run: |
|
||||||
- name: Commit and create PR
|
npm update @distube/ytdl-core -w backend
|
||||||
uses: peter-evans/create-pull-request@v3
|
if git diff --exit-code; then
|
||||||
with:
|
echo "NO changes detected"
|
||||||
title: 'build(ytdl): Upgrade ytdl package (automated)'
|
else
|
||||||
branch: 'ytdl-update-automated'
|
git config --global user.email "updater@spooty"
|
||||||
commit-message: 'build(ytdl): Upgrade ytdl package (automated)'
|
git config --global user.name "AutoUpdater"
|
||||||
token: ${{ secrets.AUTOUPDATE_PAT }}
|
git add .
|
||||||
|
git commit -m "fix(ytdl): Upgrade ytdl package (automated)"
|
||||||
|
npm run release -- --cli
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.AUTOUPDATE_PAT }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user