|
| 1 | +name: Generate Followup Metrics |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 0 * * *" # 5:30 AM IST |
| 6 | + - cron: "30 5 * * *" # 10:00 AM IST |
| 7 | + - cron: "30 11 * * *" # 4:00 PM IST |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + generate-metrics: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + permissions: |
| 14 | + contents: write |
| 15 | + pull-requests: write |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout Repository |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - name: Install Dependencies |
| 22 | + run: | |
| 23 | + sudo apt-get update |
| 24 | + sudo apt-get install -y docker.io jq |
| 25 | +
|
| 26 | + - name: Generate Metrics SVG |
| 27 | + uses: lowlighter/metrics@latest |
| 28 | + with: |
| 29 | + filename: SVG/followup.svg |
| 30 | + token: ${{ secrets.GH_METRICS_TOKEN }} |
| 31 | + user: iamAntimPal |
| 32 | + base: "" |
| 33 | + template: classic |
| 34 | + config_timezone: Asia/Kolkata |
| 35 | + plugin_followup: yes |
| 36 | + plugin_followup_sections: repositories, user |
| 37 | + plugin_followup_indepth: yes |
| 38 | + plugin_followup_archived: no |
| 39 | + |
| 40 | + - name: Commit and Push Changes |
| 41 | + run: | |
| 42 | + git config user.name "github-actions[bot]" |
| 43 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 44 | + git checkout -b update-followup-metrics |
| 45 | + git add SVG/followup.svg |
| 46 | + git commit -m "Update followup.svg [skip ci]" |
| 47 | + git push origin update-followup-metrics |
| 48 | +
|
| 49 | + - name: Create Pull Request |
| 50 | + uses: peter-evans/create-pull-request@v6 |
| 51 | + with: |
| 52 | + token: ${{ secrets.GH_METRICS_TOKEN }} |
| 53 | + branch: update-followup-metrics |
| 54 | + title: "chore: update followup metrics" |
| 55 | + body: "Auto-generated followup metrics SVG" |
0 commit comments