Update data #34310
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
# Periodically checks the nuget.org V3 catalog and incrementally builds reports. | |
# Inspired by https://simonwillison.net/2020/Oct/9/git-scraping/ | |
name: Update data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '11 * * * *' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.403 | |
- name: Install tool | |
run: dotnet tool update --global Knapcode.CatalogCrawler --version 0.0.4-beta | |
- name: Run tool | |
run: Knapcode.CatalogCrawler update-reports --data-dir . | |
- name: Commit and push if data has changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "[email protected]" | |
git add -A | |
timestamp=$(date --iso-8601=seconds) | |
git commit -m "Latest data: ${timestamp}" || exit 0 | |
git push |