az-caching-action-trigger #153
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-latest | |
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 | |
env: | |
MONGO_URL: ${{ github.event.client_payload.mongo_url }} | |
MONGO_USER: ${{ github.event.client_payload.mongo_user }} | |
MONGO_PASSWORD: ${{ github.event.client_payload.mongo_password }} | |
PROJECT_NAME: ${{ github.event.client_payload.project_name }} | |
AZURE_CLIENT_ID: ${{ github.event.client_payload.client_id }} | |
AZURE_CLIENT_SECRET: ${{ github.event.client_payload.client_secret }} | |
AZURE_TENANT_ID: ${{ github.event.client_payload.tenant_id }} | |
GITHUB_ACTIONS_ENV: Yes | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bash_profile | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
brew install az | |
export PYTHONPATH=$PYTHONPATH:. | |
pip3 install -r web/requirements.txt | |
python3 web/scripts/az_caching_script.py |