-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (45 loc) · 1.75 KB
/
az_caching_action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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