Skip to content

Commit

Permalink
feat: add new actions git-sync-submodule and npm-install
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 2, 2023
1 parent 3ad4ddb commit 5b8efdb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
30 changes: 30 additions & 0 deletions actions/git-sync-submodule/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Git sync submodule
description: Git sync submodule

runs:
using: composite
steps:
- name: Git sync submodule
shell: bash
run: |
git submodule deinit --all -f
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
rm -rf $path
git submodule update --recursive --init $path
git submodule update --recursive --remote $path
git add .
echo "${path} submodule update: "
ls -la $path
echo ""
done
if [[ `git status --porcelain` ]]; then
echo "We have new hash from git submodule"
else
echo "Nothing to update"
fi
13 changes: 13 additions & 0 deletions actions/npm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: NPM install
description: NPM install

runs:
using: composite
steps:
- name: Run npm install
shell: bash
run: |
echo "Run npm install..."
rm -rf package-lock.json node_modules
npm install --force --loglevel error --audit=false --fund=false
git add .

0 comments on commit 5b8efdb

Please sign in to comment.