-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.47 KB
/
github_billing_details.yaml
File metadata and controls
46 lines (46 loc) · 1.47 KB
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
40
41
42
43
44
45
46
name: github-automation-to-fetch-remaining-github-runner-time
on:
schedule:
- cron: '0 0 * * 0' # weekly once
workflow_dispatch:
inputs:
organization:
description: 'GitHub organization name'
required: true
type: string
default: 'devwithkrishna'
account_name:
description: 'GitHub user account name'
default: 'githubofkrishnadhas'
type: string
required: true
jobs:
github-automation-to-fetch-remaining-github-runner-time:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: set up python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: package installations
run: |
pip install pipenv
pipenv install
- name: execute python program
env:
organization: 'devwithkrishna'
account_name: 'githubofkrishnadhas'
GH_TOKEN: ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
GH_TOKEN_CLASSIC: ${{ secrets.GH_TOKEN_CLASSIC }}
run: |
pipenv run python3 github_billing.py --organization ${{ env.organization }} --account_name ${{ env.account_name }}
- name: send email program
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
run: |
pipenv run python3 send_email_using_sendgrid.py
- name: Completed
run: |
echo "program completed successfully"