forked from dchourasia/Cloud-Cost-Optimization
-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (37 loc) · 1.16 KB
/
update_cluster_smartsheet.yaml
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
name: Update Clusters to Smartsheet
run-name: Update Clusters to Smartsheet
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
update-clusters-to-smartsheet:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Setup OCM CLI
env:
OCM_TOKEN: ${{ secrets.OCM_TOKEN }}
run: |
cp bin/ocm /usr/local/bin/ocm
chmod +x /usr/local/bin/ocm
ocm login --token="${OCM_TOKEN}"
ocm list clusters
- name: Update Smartsheet
env:
OCM_TOKEN: ${{ secrets.OCM_TOKEN }}
OCM_CLIENT_ID: ${{ secrets.OCM_CLIENT_ID }}
OCM_CLIENT_SECRET: ${{ secrets.OCM_CLIENT_SECRET }}
SMARTSHEET_ACCESS_TOKEN: ${{ secrets.SMARTSHEET_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUD_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUD_SECRET }}
run: |
python src/cluster_aggregator.py