From 85ed280531567de6e14978405b83624ff011567a Mon Sep 17 00:00:00 2001 From: Natsu Date: Sat, 15 Jun 2024 00:22:11 +0700 Subject: [PATCH] chore: Update submodule to latest commit --- .github/workflows/update.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..4b68498 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,33 @@ +name: Update Submodule +on: + repository_dispatch: + types: + - update-submodule +jobs: + update-submodule: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + submodules: recursive + - name: Authorize Git + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" + - name: Update submodule + run: | + git submodule update --init --recursive --remote -f + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + - name: Commit changes + run: | + git add writings + git commit -m "Update submodule to latest commit" + git push origin main + env: + GITHUB_TOKEN: ${{ secrets.PAT }} \ No newline at end of file