-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (30 loc) · 1.01 KB
/
sendStatstoCW.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
37
38
39
name: Send GitHub Stats to CloudWatch
on: workflow_dispatch
jobs:
send-stats:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install requests boto3
- name: Fetch GitHub Repository Stats
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
REPO_NAME: 'simple-ecs-application'
run:
python .github/workflows/fetch_stats.py
- name: Upload stats to AWS Cloudwatch
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
NAMESPACE: ${{ secrets.NAMESPACE }}
run:
python .github/workflows/upload_to_cloudwatch_metrics.py