From e2fc640ac984ba0c8caf2b239b73ed0372766efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20=C4=90=E1=BA=A1t?= <52943116+qnblackcat@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:39:46 +0700 Subject: [PATCH] Create update-submodules.yml --- .github/workflows/update-submodules.yml | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/update-submodules.yml diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml new file mode 100644 index 0000000..d984c58 --- /dev/null +++ b/.github/workflows/update-submodules.yml @@ -0,0 +1,43 @@ +--- +name: Update submodules! + +############################# +# Start the job on all push # +############################# +on: + schedule: + - cron: "0 0 */7 * *" + workflow_dispatch: + +############### +# Set the Job # +############### +jobs: + build: + name: Update submodules + runs-on: ubuntu-latest + env: + PARENT_REPOSITORY: 'ewweewwe/uYouPlus' + CHECKOUT_BRANCH: 'main' + PR_AGAINST_BRANCH: 'main' + OWNER: 'ewweewwe' + + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v3 + + #################################### + # Run the action against code base # + #################################### + - name: run action + id: run_action + uses: qnblackcat/github-action-create-pr-parent-submodule@main + with: + github_token: ${{ secrets.UPDATE_SUBMODULES }} + parent_repository: ${{ env.PARENT_REPOSITORY }} + checkout_branch: ${{ env.CHECKOUT_BRANCH }} + pr_against_branch: ${{ env.PR_AGAINST_BRANCH }} + owner: ${{ env.OWNER }}