Create submodule-sync.yml

This commit is contained in:
Tonye Jack 2022-02-26 04:36:20 -05:00 committed by GitHub
parent a7b11ecaab
commit af93c64cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

40
.github/workflows/submodule-sync.yml vendored Normal file
View File

@ -0,0 +1,40 @@
on:
workflow_dispatch:
jobs:
sync:
name: Submodule Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v8.8
id: verify-changed-files
with:
files: |
tests/demo
- name: Commit changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ${{ steps.verify-changed-files.outputs.changed_files }}
git commit -m "Updated submodule."
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}