From 3d084b7d40c448514233000d44d4af7e3c7339df Mon Sep 17 00:00:00 2001 From: wolfcomp Date: Tue, 10 Jan 2023 22:39:41 +0100 Subject: [PATCH 1/4] fix submodule target for ClientStructs --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 3860651bd..e265f5fc0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/goatcorp/ImGuiScene [submodule "lib/FFXIVClientStructs"] path = lib/FFXIVClientStructs - url = https://github.com/goatcorp/FFXIVClientStructs.git + url = https://github.com/aers/FFXIVClientStructs.git [submodule "lib/Nomade040-nmd"] path = lib/Nomade040-nmd url = https://github.com/Nomade040/nmd.git From 783dc47963a193e2b2f8caf70a9b18eacd26c381 Mon Sep 17 00:00:00 2001 From: wolfcomp Date: Tue, 10 Jan 2023 22:40:52 +0100 Subject: [PATCH 2/4] add schedule to check ClientStructs for updates --- .github/workflows/update-submodules.yml | 46 +++++++++++++++++++++++++ 1 file changed, 46 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 000000000..b32272395 --- /dev/null +++ b/.github/workflows/update-submodules.yml @@ -0,0 +1,46 @@ +name: Submodule daily check +on: + schedule: + - cron: "0 0 */1 * *" + workflow_dispatch: + +jobs: + check: + name: Submodule check + runs-on: ubuntu-latest + strategy: + matrix: + branches: [master] + + defaults: + run: + shell: bash + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + ref: ${{ matrix.branches }} + token: ${{ secrets.PAT }} + - name: Create update branch + run: git checkout -b csupdate/${{ matrix.branches }} + - name: Initialize mandatory git config + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email noreply@github.com + git config --global pull.rebase false + - name: Update submodule + run: | + git checkout -b csupdate-${{ matrix.branches }} + cd lib/FFXIVClientStructs + git fetch + git reset --hard origin/main + cd ../.. + git add lib/FFXIVClientStructs + git commit --message "Update ClientStructs" + git push origin csupdate-${{ matrix.branches }} + - name: Create PR + run: | + echo ${{ secrets.PAT }} | gh auth login --with-token + gh pr create --head csupdate-${{ matrix.branches }} --title "Update ClientStructs" --body "" --base ${{ matrix.branches }} From 168a2ef63a1b8946786371c7480c4ea5c2de82dc Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Tue, 10 Jan 2023 22:49:33 +0100 Subject: [PATCH 3/4] mess with naming a bit --- .github/workflows/update-submodules.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index b32272395..3d405ae5d 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -1,4 +1,4 @@ -name: Submodule daily check +name: Check for FFXIVCS changes on: schedule: - cron: "0 0 */1 * *" @@ -6,7 +6,7 @@ on: jobs: check: - name: Submodule check + name: FFXIVCS Check runs-on: ubuntu-latest strategy: matrix: @@ -43,4 +43,4 @@ jobs: - name: Create PR run: | echo ${{ secrets.PAT }} | gh auth login --with-token - gh pr create --head csupdate-${{ matrix.branches }} --title "Update ClientStructs" --body "" --base ${{ matrix.branches }} + gh pr create --head csupdate-${{ matrix.branches }} --title "[${{ matrix.branches }}] Update ClientStructs" --body "" --base ${{ matrix.branches }} From ab01c7a6d7e3cf03d6d30dbe246fb3cf7aebcbe8 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Wed, 11 Jan 2023 01:23:22 +0100 Subject: [PATCH 4/4] use GITHUB_TOKEN --- .github/workflows/update-submodules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 3d405ae5d..6290357f1 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -42,5 +42,5 @@ jobs: git push origin csupdate-${{ matrix.branches }} - name: Create PR run: | - echo ${{ secrets.PAT }} | gh auth login --with-token + echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token gh pr create --head csupdate-${{ matrix.branches }} --title "[${{ matrix.branches }}] Update ClientStructs" --body "" --base ${{ matrix.branches }}