-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #6 from FAMAF-resources/pretty
Pretty
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
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,53 @@ | ||
name: 'Update Submodule Action [Child]' | ||
on: | ||
repository_dispatch: | ||
types: [update-submodules-famaf] | ||
schedule: | ||
- cron: '0 0 * * *' | ||
- cron: '0 12 * * *' | ||
# push: | ||
# branches: | ||
# - main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SHOULD_COMMIT: '' | ||
|
||
jobs: | ||
famaftestupdate: | ||
name: Update submodules | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
submodules: recursive | ||
- name: Update submodules | ||
run: git submodule update --init --recursive --checkout -f --remote | ||
|
||
- name: Update status | ||
id: status | ||
run: | | ||
echo $(git status -s) | ||
if [[ $(git status -s) ]]; then | ||
export SHOULD_COMMIT=true | ||
else | ||
export SHOULD_COMMIT=false | ||
fi | ||
echo "SHOULD_COMMIT=$SHOULD_COMMIT" >> $GITHUB_ENV | ||
echo "SHOULD_COMMIT=$SHOULD_COMMIT" | ||
- name: Config git | ||
if: ${{ env.SHOULD_COMMIT == 'true' }} | ||
run: | | ||
git config --global user.name "GitHub Action" | ||
git config --global user.email "[email protected]" | ||
source ./parentRepository/scripts/update_w_from_parent.sh | ||
git add .github | ||
git commit -am "[BOT] Update submodules at $(date "+DATE: %Y-%m-%d TIME: %H:%M:%S")" | ||
git push |
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,3 @@ | ||
[submodule "Famaf-Resources-Manager"] | ||
path = Famaf-Resources-Manager | ||
url = [email protected]:FAMAF-resources/Famaf-Resources-Manager.git |
Submodule Famaf-Resources-Manager
added at
3fcb92