From b8ea7a88bbc093b46f856e29246e2267c64fcb2f Mon Sep 17 00:00:00 2001 From: Xyphuz Date: Sun, 28 Apr 2024 02:03:41 +0800 Subject: [PATCH] ci: check updates of compose-spec and file PR --- .github/workflows/cron.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 35c8466..5230d09 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,19 +1,24 @@ -name: CRON +name: Submodule Updates on: schedule: - cron: '0 0 * * *' jobs: - update: + update_submodules: + name: Submodule update runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: update compose-spec submodule - run: | - git submodule update --init --recursive - git submodule update --remote --recursive - - name: Commit changes - run: | - git commit -am "chore: update submodules" || echo "No changes to commit." - git push + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Update Submodules + uses: releasehub-com/github-action-create-pr-parent-submodule@v1 + continue-on-error: true + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + parent_repository: ${{ github.repository_owner }}/compose-viz + checkout_branch: main + pr_against_branch: main + owner: ${{ github.repository_owner }} + label: "automerge"