Skip to content

Retrieve and commit Sonatype stats #30

Retrieve and commit Sonatype stats

Retrieve and commit Sonatype stats #30

name: Retrieve and commit Sonatype stats
on:
workflow_dispatch:
schedule:
- cron: '0 0 15 * *'
jobs:
update_data:
runs-on: ubuntu-latest
steps:
- uses: coursier/cache-action@v6
- uses: VirtusLab/scala-cli-setup@v1.3.0
- uses: actions/checkout@v4
- name: Checkout the gh-pages branch while keeping the scripts
run: |
git fetch origin gh-pages --depth 1
git checkout origin/gh-pages
git restore --source=${{ github.sha }} --worktree .github/scripts
- name: Update stats
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: .github/scripts/update.sc
- name: Push changes
run: |
git config --global user.name 'Scala Center Bot'
git config --global user.email 'scala-center-bot@users.noreply.github.com'
git add sonatype-stats
git commit -m "Update stats"
git push origin HEAD:gh-pages
- uses: gautamkrishnar/keepalive-workflow@v2
with:
committer_username: scala-center-bot
committer_email: scala-center-bot@users.noreply.github.com