-
Notifications
You must be signed in to change notification settings - Fork 1
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 #5 from dandi/update-action
Provide a workflow to update this repo
- Loading branch information
Showing
1 changed file
with
52 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,52 @@ | ||
name: Update repository | ||
|
||
on: | ||
schedule: | ||
- cron: '51 6 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-repo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '^3.9' | ||
|
||
- name: Configure git environment | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "DANDI Bot" | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get dandisets-linkml-status-tools submodule content | ||
run: git submodule update --init --recursive --remote | ||
|
||
- name: Commit of the update of submodule if there is a change | ||
run: | | ||
if git diff --quiet -- "./tools"; then | ||
echo "There is no change in the dandisets-linkml-status-tools submodule." | ||
else | ||
git add ./tools | ||
git commit -m "Update dandisets-linkml-status-tools submodule" | ||
git push | ||
echo "The dandisets-linkml-status-tools submodule has been updated." | ||
fi | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install datalad | ||
python -m pip install con-duct | ||
python -m pip install ./tools | ||
# Update this repo with the latest validation reports | ||
- name: datalad run dandisets-linkml-status with con-duct | ||
run: | | ||
datalad run -m "Get latest validation reports with a summary" duct dandisets-linkml-status --include-unpublished --dandi-instance dandi -l INFO | ||
git push | ||
echo "The repository has been updated with the latest validation reports." | ||