File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -46,22 +46,31 @@ jobs:
4646 php_version : ' 8.4'
4747 command : ' docs'
4848
49- - name : Git Submodule Update
50- run : |
51- git pull --recurse-submodules
52- git submodule update --init --recursive
53- git submodule update --recursive --remote
49+ - name : Update submodules
50+ id : update
51+ run : git submodule update --remote --recursive
5452
55- - name : Commit update
56- run : |
57- #git remote set-url origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}
53+ - name : Run git status
54+ id : status
55+ run : echo ":: set-output name=status::$(git status -s)"
5856
57+ - name : Add and commit files
58+ if : ${{ steps.status.outputs.status }}
59+ run : |
60+ git add .
5961 git config --global user.email "github-actions[bot]@users.noreply.github.com"
6062 git config --global user.name "github-actions[bot]"
63+ git commit -m "Update submodules at $(date "+DATE: %Y-%m-%d TIME: %H:%M:%S")"
6164
62- cd docs/wiki
63- #git remote set-url origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git
65+ - name : Push changes
66+ if : ${{ steps.status.outputs.status && github.event_name == 'push' }}
67+ uses : ad-m/github-push-action@master
68+ with :
69+ github_token : ${{ github.token }}
70+ branch : dev
6471
65- git add --all
66- git commit -m "Update submodules" || echo "No changes to commit"
67- git push
72+ - name : Git Submodule Update
73+ run : |
74+ git pull --recurse-submodules
75+ git submodule update --init --recursive
76+ git submodule update --recursive --remote
You can’t perform that action at this time.
0 commit comments