Run Python script #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Python script | |
on: | |
workflow_dispatch: | |
jobs: | |
CreateAPIProduct: | |
runs-on: ubuntu-latest | |
environment: apiMana | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install python-dotenv | |
sudo apt-get update | |
sudo apt-get install azure-cli | |
- name: Azure Login | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Change to script directory and run Python script | |
run: | | |
cd python | |
python products.py | |
env: | |
clientId: ${{ secrets.CLIENT_ID }} | |
clientSecret: ${{ secrets.CLIENT_SECRET }} | |
resourceGroupName: ${{ secrets.RESOURCE_GROUP_NAME }} | |
apimServiceName: ${{ secrets.APIM_SERVICE_NAME }} | |
tenantId: ${{ secrets.TENANT_ID }} | |
subscriptionId: ${{ secrets.SUBSCRIPTION_ID }} | |
product_id: ${{ secrets.PRODUCT_ID }} | |
product_name: ${{ secrets.PRODUCT_NAME }} | |