az-caching-action-trigger #167
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: AZ Caching | |
on: | |
repository_dispatch: | |
types: az-caching-action-trigger | |
jobs: | |
az_caching: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
steps: | |
- uses: 'actions/checkout@v3' | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Echo the values | |
run: | | |
echo "client_payload is: ${{ github.event.client_payload.client_payload }}" | |
echo "azure_credentials is: ${{ github.event.client_payload.azure_credentials }}" | |
echo "project_name is: ${{ github.event.client_payload.project_name }}" | |
echo "client_id is: ${{ github.event.client_payload.client_id }}" | |
echo "client_secret is: ${{ github.event.client_payload.client_secret }}" | |
echo "tenant_id is: ${{ github.event.client_payload.tenant_id }}" | |
- name: Az CLI login | |
uses: Azure/login@v1 | |
env: | |
CREDENTIALS: ${{ github.event.client_payload.azure_credentials }} | |
with: | |
creds: ${{ env.CREDENTIALS }} | |
- name: Caching Tasks | |
if: always() | |
run: | | |
export MONGO_URL=${{ github.event.client_payload.mongo_url }} | |
export MONGO_USER=${{ github.event.client_payload.mongo_user }} | |
export MONGO_PASSWORD=${{ github.event.client_payload.mongo_password }} | |
export PROJECT_NAME=${{ github.event.client_payload.project_name }} | |
export SECRET_KEY=${{ secrets.SECRET_KEY }} | |
export GITHUB_ACTIONS_ENV=Yes | |
export PYTHONPATH=$PYTHONPATH:. | |
pip3 install -r web/requirements.txt | |
python3 web/scripts/az_caching_script.py |