Skip to content

update submodule in response to marketing content update #20

update submodule in response to marketing content update

update submodule in response to marketing content update #20

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