Skip to content

Quick Deploy Test

Quick Deploy Test #1

Workflow file for this run

name: Quick Deploy Test
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
issues: write
pull-requests: write
jobs:
deploy-test:
name: Deploy [TEST]
runs-on: ubuntu-latest
environment: test
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install pip --upgrade
echo "PIP_CACHE_DIR=$(python -m pip cache dir)" >> $GITHUB_ENV
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Configure GCP Credentials
uses: "google-github-actions/auth@v0"
with:
workload_identity_provider: "projects/734798842681/locations/global/workloadIdentityPools/my-pool/providers/gh-provider"
service_account: "[email protected]"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::162277344632:role/CeruleanCloudDeploy
aws-region: eu-central-1
- name: Configure docker
run: gcloud auth configure-docker -q
- run: pip install -r requirements.txt
# - uses: pulumi/actions@v3
# id: pulumi-images
# env:
# PULUMI_CONFIG_PASSPHRASE: "test"
# with:
# work-dir: images/
# command: up
# stack-name: test
# Copy shared database_client.py files
- name: Copy Shared File
run: |
mkdir -p cerulean_cloud/cloud_function_ais_analysis/cerulean_cloud/
cp cerulean_cloud/database_client.py cerulean_cloud/cloud_function_ais_analysis/cerulean_cloud/database_client.py
cp cerulean_cloud/database_schema.py cerulean_cloud/cloud_function_ais_analysis/cerulean_cloud/database_schema.py
- uses: pulumi/actions@v3
id: pulumi
env:
PULUMI_CONFIG_PASSPHRASE: "test"
MODEL: ${{ steps.pulumi-images.outputs.model }}
with:
command: up --debug
stack-name: test
- uses: wagnerpereira/gce-cloudsql-proxy-action@v2
with:
instance: ${{ steps.pulumi.outputs.database_instance_name }}
# - name: Run database migrations
# env:
# DB_URL: ${{ steps.pulumi.outputs.database_url_alembic }}
# run: alembic upgrade head