Skip to content

Retrieve and commit Sonatype stats #19

Retrieve and commit Sonatype stats

Retrieve and commit Sonatype stats #19

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/[email protected]
- 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 '[email protected]'
git add sonatype-stats
git commit -m "Update stats"
git push origin HEAD:gh-pages
- uses: gautamkrishnar/keepalive-workflow@v1
with:
committer_username: scala-center-bot
committer_email: [email protected]