Refresh Volumes #176
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: Refresh Volumes | |
| on: | |
| schedule: | |
| - cron: "0 0 * * 0" # Runs every Sunday at midnight UTC. You can customize the schedule using cron syntax. | |
| workflow_dispatch: # This allows manual triggering from the GitHub Actions UI. | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0 | |
| with: | |
| run_install: true | |
| - name: Refresh Radar Datasets | |
| env: | |
| GOOGLE_SHEET_ID: ${{ vars.GOOGLE_SHEET_ID }} | |
| GOOGLE_CLIENT_EMAIL: ${{ secrets.GOOGLE_CLIENT_EMAIL }} | |
| GOOGLE_PRIVATE_KEY: ${{ secrets.GOOGLE_PRIVATE_KEY }} | |
| run: | | |
| export GOOGLE_SHEET_ID=$GOOGLE_SHEET_ID | |
| export GOOGLE_CLIENT_EMAIL=$GOOGLE_CLIENT_EMAIL | |
| export GOOGLE_PRIVATE_KEY=$GOOGLE_PRIVATE_KEY | |
| pnpm start fetch all | |
| pnpm lint | |
| - name: Create Pull Request | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git checkout -B automated/volume-updates | |
| git add -A | |
| git diff --staged --quiet && echo "No changes to commit" && exit 0 | |
| git commit -m "Automated dataset refresh" | |
| git push origin automated/volume-updates --force | |
| gh pr create \ | |
| --title "Radar Volumes Refresh" \ | |
| --body "Refresh technology radar datasets from latest sources." \ | |
| --label "data-refresh" \ | |
| --reviewer setchy \ | |
| --base main \ | |
| || echo "PR already exists, skipping creation" |