-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (32 loc) · 1.03 KB
/
monthly_metrics.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
35
36
name: Monthly Data Collation
# Schedule to run at 00:00 on the 1st day of each month
on:
schedule:
- cron: "52 13 1 * *" # Runs at 13:52 on the 1st day of every month
# Allows the workflow to be triggered manually
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./metrics/monthly_scripts
steps:
# Step to checkout the repository
- uses: actions/checkout@v4
with:
ref: metrics
# Step to run the shell script
- name: Run shell script - Monthly Clones
run: |
chmod +x monthly_clones.sh
./monthly_clones.sh $(date -d "$(date +%Y-%m-1) -1 month")
- name: Run shell script - Monthly Clones
run: |
chmod +x monthly_traffic.sh
./monthly_traffic.sh $(date -d "$(date +%Y-%m-1) -1 month")
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply monthly metrics changes
branch: metrics