fast data collection #2085
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: fast data collection | |
| on: | |
| schedule: | |
| # run every 6 hours | |
| - cron: "0 */6 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| enable_ssh_access: | |
| type: boolean | |
| description: "Enable ssh access" | |
| required: false | |
| default: false | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up uv with caching | |
| id: setup-uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| activate-environment: true | |
| enable-cache: true | |
| cache-suffix: ${{ steps.runner-info.outputs.cache-hash }} | |
| ignore-nothing-to-cache: true | |
| - name: install project | |
| run: | | |
| uv tool install . | |
| - name: Enable ssh access | |
| uses: mxschmitt/action-tmate@v3 | |
| if: ${{ inputs.enable_ssh_access }} | |
| with: | |
| limit-access-to-actor: true | |
| - name: collect data | |
| env: | |
| STARCRAFT_GITHUB_TOKEN: ${{ secrets.STARCRAFT_GITHUB_TOKEN }} | |
| run: | | |
| starcraft-stats get-dependencies --verbosity=trace | |
| starcraft-stats get-releases --verbosity=trace | |
| - name: commit | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| commit_message: "ci: fetch craft applications & libraries" | |
| commit_author: "github-actions <github-actions@users.no-reply.github.com>" | |
| commit_user_name: "github-actions" | |
| commit_user_email: "github-actions@users.no-reply.github.com" |