-
Notifications
You must be signed in to change notification settings - Fork 185
34 lines (33 loc) · 1.18 KB
/
sonatype-stats.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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@v2
with:
committer_username: scala-center-bot
committer_email: [email protected]