Monthly Data Collation #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |