Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions .github/workflows/pgdb-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- feature/pipelines # Додано для запуску з гілки feature/pipelines, видалити у фінальній версії

permissions:
id-token: write # ОБОВ'ЯЗКОВО для OIDC логіну
Expand All @@ -27,14 +28,12 @@ jobs:
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}

- name: Deploy PG Flexible Server
run: |
echo "Generate Random PostgreSQL Server Name"
PGDB_NAME="pg-rest-api-westeurope"

# echo "Get Runner Public IP"
# IP=$(curl -s https://ifconfig.me)

run: |
IP=$(curl -s https://ifconfig.me)
echo "Runner Public IP: $IP"

echo "Create PostgreSQL Flexible Server"
PGDB_NAME="pg-rest-api-westeurope"
az postgres flexible-server create \
--resource-group $RESOURCE_GROUP \
--name $PGDB_NAME \
Expand All @@ -44,17 +43,9 @@ jobs:
--tier Burstable \
--sku-name Standard_B1ms \
--storage-size 32 \
--version 16
# --public-access 13.82.232.186

# echo "Add Firewall Rule"
# az postgres flexible-server firewall-rule create \
# --resource-group $RESOURCE_GROUP \
# --name $PGDB_NAME \
# --rule-name github-temp \
# --start-ip-address $IP \
# --end-ip-address $IP

--version 16 \
--public-access $IP

echo "Check PostgreSQL server status"
az postgres flexible-server show \
--name $PGDB_NAME \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rg-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "Daily Resource Group Cleanup Pipeline"
on:
schedule:
- cron: '0 23 * * *' # Every day at 23:00 UTC
workflow_dispatch:

permissions:
id-token: write # ОБОВ'ЯЗКОВО для OIDC логіну
Expand Down
Loading