|
@@ -21,6 +21,7 @@ jobs:
|
|
outputs:
|
|
outputs:
|
|
droplet_id: ${{ steps.create-droplet.outputs.droplet_id }}
|
|
droplet_id: ${{ steps.create-droplet.outputs.droplet_id }}
|
|
droplet_ip: ${{ steps.get-droplet-ip.outputs.droplet_ip }}
|
|
droplet_ip: ${{ steps.get-droplet-ip.outputs.droplet_ip }}
|
|
|
|
+ postgres_password: ${{ steps.get-postgres-password.outputs.postgres_password }}
|
|
|
|
|
|
steps:
|
|
steps:
|
|
- name: Checkout
|
|
- name: Checkout
|
|
@@ -94,6 +95,12 @@ jobs:
|
|
user: root # TODO: use non-root user
|
|
user: root # TODO: use non-root user
|
|
key: ${{ secrets.SSH_KEY }}
|
|
key: ${{ secrets.SSH_KEY }}
|
|
|
|
|
|
|
|
+ - name: Get POSTGRES_PASSWORD from .env file
|
|
|
|
+ id: get-postgres-password
|
|
|
|
+ run: |
|
|
|
|
+ postgres_password=$(ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa root@${{ steps.get-droplet-ip.outputs.droplet_ip }} "cat ./runtipi/.env | grep POSTGRES_PASSWORD | cut -d '=' -f2")
|
|
|
|
+ echo "postgres_password=$postgres_password" >> $GITHUB_OUTPUT
|
|
|
|
+
|
|
e2e:
|
|
e2e:
|
|
timeout-minutes: 30
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
@@ -126,7 +133,9 @@ jobs:
|
|
node-version: 18
|
|
node-version: 18
|
|
|
|
|
|
- name: Create .env.e2e file with Droplet IP
|
|
- name: Create .env.e2e file with Droplet IP
|
|
- run: echo "SERVER_IP=${{ needs.deploy.outputs.droplet_ip }}" > .env.e2e
|
|
|
|
|
|
+ run: |
|
|
|
|
+ echo "SERVER_IP=${{ needs.deploy.outputs.droplet_ip }}" > .env.e2e
|
|
|
|
+ echo "POSTGRES_PASSWORD=${{ needs.deploy.outputs.postgres_password }}" >> .env.e2e
|
|
|
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
run: pnpm install
|