From b2fbb01a7415c4027aa50dd2a1773d0b1e0dde3a Mon Sep 17 00:00:00 2001 From: raiper34 Date: Sat, 1 Feb 2025 15:54:43 +0100 Subject: [PATCH] ci(github-actions): add automatic ytdl update into github actions --- .github/workflows/auto-merge.yml | 17 +++++++++++++++++ .github/workflows/update-ytdl.yml | 6 +----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/auto-merge.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..af8a24a --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,17 @@ +name: Auto-merge Github Actions +on: + repository_dispatch: + types: [ create-pull-request ] + +permissions: + pull-requests: write + contents: write + +jobs: + automerge: + runs-on: ubuntu-latest + if: github.actor == 'github-actions' + steps: + - uses: peter-evans/enable-pull-request-automerge@v3 + with: + pull-request-number: ${{ github.event.pull_request.number }} \ No newline at end of file diff --git a/.github/workflows/update-ytdl.yml b/.github/workflows/update-ytdl.yml index a16a64a..943eeb9 100644 --- a/.github/workflows/update-ytdl.yml +++ b/.github/workflows/update-ytdl.yml @@ -2,7 +2,7 @@ name: update-ytdl on: workflow_dispatch: - branches: ytdl-update-automated + branches: main schedule: - cron: '0 0 * * *' @@ -24,7 +24,3 @@ jobs: 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 }}