Skip to content

Commit b578ca8

Browse files
upliad json details to sa container
1 parent bf09720 commit b578ca8

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: github-app-installation-details
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
organization:
6+
description: 'GitHub organization Name'
7+
required: true
8+
type: string
9+
default: 'devwithkrishna'
10+
schedule:
11+
- cron: '0 0 1 * *' # Monthly once 12:00 AM
12+
13+
jobs:
14+
github-app-installation-details:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: git checkout
18+
uses: actions/checkout@v4
19+
- name: set up python 3.11
20+
uses: actions/setup-python
21+
with:
22+
python-version: '3.11'
23+
- name: package installations
24+
run: |
25+
pip install pipenv
26+
pipenv install
27+
- name: execute python program
28+
env:
29+
ORGANIZATION: ${{ inputs.organization }}
30+
run: |
31+
pipenv run python3 list_all_github_app_in_org.py
32+
- name: azure login
33+
uses: azure/login@v1
34+
with:
35+
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
36+
- name: upload github app json details
37+
env:
38+
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
39+
uses: azure/cli@v1
40+
with:
41+
azcliversion: 2.56.0
42+
inlinescript: |
43+
az account set -s "TECH-ARCHITECTS-NONPROD"
44+
az account show -o json
45+
az storage blob upload --account-name techarchitectssa --account-key $ACCESS_KEY --container-name github-app-list --file list_of_github_installations.json --name list_of_github_installations.json --overwrite
46+
- name: Completed
47+
run: |
48+
echo "program completed successfully"

0 commit comments

Comments
 (0)