feat: database migration to postgres #16
Workflow file for this run
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
# The name of the deployment | |
name: Trigger auto deployment for containerapps | |
# When this action will be executed | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
jobs: | |
push_to_registry: | |
environment: playground | |
name: Push Docker image to Container App | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Log in to Azure | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Create env file | |
run: | | |
echo "${{ secrets.AZURE_BLOB_STORAGE_ACCOUNT }}" >> ./ethereal-nexus-dashboard/.env | |
echo "${{ secrets.AZURE_BLOB_STORAGE_SECRET }}" >> ./ethereal-nexus-dashboard/.env | |
echo "${{ secrets.PGHOST }}" >> ./ethereal-nexus-dashboard/.env | |
echo "${{ secrets.PGUSER }}" >> ./ethereal-nexus-dashboard/.env | |
echo "${{ secrets.PGPORT }}" >> ./ethereal-nexus-dashboard/.env | |
echo "${{ secrets.PGPASSWORD }}" >> ./ethereal-nexus-dashboard/.env | |
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./ethereal-nexus-dashboard/.env | |
- name: Deploy Container App | |
uses: azure/container-apps-deploy-action@v1 | |
with: | |
containerAppName: ethereal-nexus-app-${{ github.event.number }} | |
appSourcePath: ${{ github.workspace }}/ethereal-nexus-dashboard | |
acrName: etherealnexus | |
acrUsername: ${{ secrets.REGISTRY_USERNAME }} | |
acrPassword: ${{ secrets.REGISTRY_PASSWORD }} | |
resourceGroup: RG-ethereal_realms_accelerator | |
containerAppEnvironment: ethereal-nexus-env | |
location: westeurope | |
targetPort: 3000 | |
- name: Update Environment Variables | |
run: | | |
fqdn=$(az containerapp ingress show -g RG-ethereal_realms_accelerator -n ethereal-nexus-app-$PR_NUMBER | jq -r '.fqdn') | |
az containerapp update -g RG-ethereal_realms_accelerator -n ethereal-nexus-app-$PR_NUMBER --env-vars NEXTAUTH_URL=${fqdn} |