Skip to content

Commit

Permalink
feat(CI): Add Submodule Updates workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jim60105 committed Sep 25, 2023
1 parent a1f3ffe commit 5ae5f06
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/submodule-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Submodule Updates

on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
update_submodules:
name: Submodule update
runs-on: ubuntu-latest
env:
PARENT_REPOSITORY: ${{ github.repository_owner }}/docker-whisperX
CHECKOUT_BRANCH: master
PR_AGAINST_BRANCH: master
OWNER: ${{ github.repository_owner }}

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Update Submodules
uses: releasehub-com/github-action-create-pr-parent-submodule@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
parent_repository: ${{ env.PARENT_REPOSITORY }}
checkout_branch: ${{ env.CHECKOUT_BRANCH}}
pr_against_branch: ${{ env.PR_AGAINST_BRANCH }}
owner: ${{ env.OWNER }}
label: "automerge"

auto_merge_pr:
name: Auto Merge PR
runs-on: ubuntu-latest
needs: "update_submodules"
steps:
- name: Git Auto Merge
uses: plm9606/[email protected]
with:
# Use PAT to trigger the docker workflow
github-token: ${{ secrets.CR_PAT }}
merge-method: squash
reviewers-number: 0
label-name: "automerge"
auto-delete: true

- name: Remove label
if: ${{ success() }}
uses: buildsville/add-remove-label@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
label: "automerge"
type: remove

0 comments on commit 5ae5f06

Please sign in to comment.