-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (35 loc) · 1.11 KB
/
update_submodules.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
on:
workflow_dispatch:
repository_dispatch:
types:
update
push:
branches: [main]
jobs:
update-submodules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.REPO_TOKEN }}
- name: update nearorg_marketing
run: |
git submodule init
git submodule update --remote --merge
- name: Check the diff
id: check_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Log next steps
if: steps.check_diff.outputs.changed != 'true'
run: |
echo "Workflow will make no changes. The submodule is already up-to-date."
- name: Conditional Commit
if: steps.check_diff.outputs.changed == 'true'
run: |
echo "Preparing a commit to update the submodule."
git config --local user.email "[email protected]"
git config --local user.name "github-actions-bot"
git commit -m "update submodule in response to marketing content update" -a
git push