Populate organization snapshots #1
This file contains hidden or 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
| name: Populate organization snapshots | |
| on: | |
| schedule: | |
| - cron: "17 2 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| populate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Populate data snapshots | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| make populate | |
| make service-data | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data docs/data | |
| if git diff --cached --quiet; then | |
| echo "No data changes to commit" | |
| exit 0 | |
| fi | |
| SNAPSHOT_DATE="$(date -u +%F)" | |
| git commit -m "Update organization snapshot ${SNAPSHOT_DATE}" | |
| git push |