Skip to content

Commit

Permalink
Merge pull request #68 from cosmology-tech/update-at-intervals
Browse files Browse the repository at this point in the history
add update yml
  • Loading branch information
Zetazzz authored Feb 26, 2024
2 parents 67a7ae0 + 39ca8e7 commit 1c61d05
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Submodule Change Check

on:
workflow_dispatch:

jobs:
check_submodule:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: "true"
- uses: actions/setup-node@v3
with:
node-version: 16.14.0
registry-url: https://registry.npmjs.org/
- name: Check for submodule changes
id: submodule_check
run: |
# Navigate to the submodule directory
cd path/to/submodule
# Check if there are any differences between the submodule's HEAD and the commit recorded in the superproject
if git diff --exit-code HEAD..origin/main; then
echo "Submodule has not changed"
echo "CHANGED=false" >> $GITHUB_ENV
else
echo "Submodule has changed"
echo "CHANGED=true" >> $GITHUB_ENV
fi
- name: Run commands if submodule has changed
if: env.CHANGED == 'true'
run: |
echo "Running commands because the submodule has changed"
# Place your commands here
2 changes: 1 addition & 1 deletion packages/chain-registry/chain-registry
Submodule chain-registry updated 219 files

0 comments on commit 1c61d05

Please sign in to comment.