Skip to content

Commit

Permalink
testing automation flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-Microsoft committed Nov 13, 2024
1 parent 50dc70f commit fc843c6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/code/script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os

# Get the secret from environment variables
my_secret = os.getenv('MY_SECRET')

if my_secret:
print(f"The client value is: {my_secret}")
else:
print("client id not found!")
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Access GitHub Secrets in Python

on:
push:
branches:
- main # Trigger on push to the main branch

jobs:
access-secrets:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
pip install -r requirements.txt # Install any dependencies if needed
- name: Run Python script
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
run: |
python script.py # Run your Python script

0 comments on commit fc843c6

Please sign in to comment.