Skip to content

Commit

Permalink
Update update_datasources.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillanacosta authored Jul 18, 2024
1 parent 0f5cc6e commit bc37622
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/update_datasources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,20 @@ jobs:
env:
token: ${{ secrets.PAT }}
run: |
# Set Git configuration
git config --local user.email "[email protected]"
git config --local user.name "OmicsFixID bot"
# Stage all changes
git add --all
git status
git commit -m "Updated data" -m "Artifact URL: ${{ github.event.client_payload.datasource }}"
git push -f
# Check the status and proceed only if there are changes
if ! git diff-index --quiet HEAD; then
# Commit changes
git commit -m "Updated data" -m "Artifact URL: ${{ github.event.client_payload.datasource }}"
# Push changes
git push -f
else
echo "No changes to commit."
fi
- name: Update dataSourceVersion
run: |
new_date=${{ github.event.client_payload.date }}
Expand Down Expand Up @@ -78,6 +85,12 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "OmicsFixID bot"
git add --all
git status
git commit -m "Updated dataSourceVersion for $datasource"
git push -f
# Check the status and proceed only if there are changes
if ! git diff-index --quiet HEAD; then
# Commit changes
git commit -m "Updated dataSourceVersion for $datasource"
# Push changes
git push -f
else
echo "No changes to commit."
fi

0 comments on commit bc37622

Please sign in to comment.