-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from cosmology-tech/update-at-intervals
add update yml
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Submodule chain-registry
updated
219 files