10gen / realm-cli

MongoDB Realm CLI
Apache License 2.0
6 stars 23 forks source link

Push fails in github action but succeeds locally #158

Open vegar opened 3 years ago

vegar commented 3 years ago
❯ realm-cli -v
realm-cli version 2.0.0-beta.6

I've made myself a github action that first exports the app, copies new files into /hosting/files and then tries to push the changes using the command line :

realm-cli push --local realm --remote *** --include-hosting --reset-cdn-cache -y

When running this command locally on a windows 10 machine, I'm rewarded with the output

Determining changes
Import hosting assets
Reset CDN cache
Successfully pushed app up: ***

The github action fails though with the following output:

  shell: /usr/bin/bash -e {0}
Determining changes
push failed: EOF
Error: Process completed with exit code 1.

What can be the reason for this? I've checked that the github action copies the new files into the /hosting/files folder before pushing.

Here's the action steps:

steps:      
   - uses: actions/checkout@v2      
   - uses: actions/setup-node@v2
           with:
                     node-version: 15
    - run: npm ci
    - run: npm run build
    - name: Realm
       run: npm install -g mongodb-realm-cli@beta      
    - run: realm-cli -v      
    - run: realm-cli login --api-key ${{ secrets.MONGODB_REALM_API_KEY }} --private-api-key ${{ secrets.MONGODB_REALM_PRIVATE_KEY }} --realm-url https://realm.mongodb.com --atlas-url https://cloud.mongodb.com      
    - run: realm-cli pull --local realm --remote ${{ secrets.MONGODB_REALM_APPID }}      
    - run: mkdir -p realm/hosting/files      
    - run: touch realm/hosting/metadata.json      
    - run: cp -a dist/. realm/hosting/files/      
    - run: ls -la realm/hosting/files      
    - run: realm-cli push --local realm --remote ${{ secrets.MONGODB_REALM_APPID }} --include-hosting --reset-cdn-cache -y<!--EndFragment-->
stoefln commented 2 years ago

Same here on my local Mac M1

benoitwerner commented 1 year ago

I have the same problem, were you able to resolve it?

stoefln commented 1 year ago

No. We switched away from realm. We were facing too many issues.

benoitwerner commented 1 year ago

No. We switched away from realm. We were facing too many issues.

Thanks for your reply!