-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
161 additions
and
90 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
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 }}" | ||
echo "infracost_token is: ${{ github.event.client_payload.infracost_token }}" | ||
- 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 }} | ||
INFRACOST_TOKEN: ${{ github.event.client_payload.infracost_token }}" | ||
INFRACOST_URL: http://localhost:4000 | ||
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 |
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
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
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
Oops, something went wrong.