Correcting the github condition to start the API server (#3506)

This commit is contained in:
Arpit Mohan 2021-03-12 11:06:54 +05:30 committed by GitHub
parent 4c12e643f2
commit f11cd45886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 16 deletions

View File

@ -53,20 +53,22 @@ jobs:
with:
node-version: "14.15.4"
- name: Get yarn cache directory path
id: yarn-dep-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again
- name: Cache npm dependencies
id: yarn-dep-cache
uses: actions/cache@v2
env:
cache-name: cache-yarn-dependencies
with:
# Node dependencies are stored in `./node_modules` on Linux/macOS
path: |
'**/node_modules'
'~/.npm'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
${{ steps.yarn-dep-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-dep-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
${{ runner.os }}-yarn-dep-
# Install all the dependencies
- name: Install dependencies
@ -156,20 +158,22 @@ jobs:
with:
node-version: "14.15.4"
- name: Get yarn cache directory path
id: yarn-dep-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again
- name: Cache npm dependencies
id: yarn-dep-cache
uses: actions/cache@v2
env:
cache-name: cache-yarn-dependencies
with:
# Node dependencies are stored in `./node_modules` on Linux/macOS
path: |
'**/node_modules'
'~/.npm'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
${{ steps.yarn-dep-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-dep-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
${{ runner.os }}-yarn-dep-
# Install all the dependencies
- name: Install dependencies
@ -182,7 +186,7 @@ jobs:
path: app/client/build
- name: Pull release server docker container and start it locally
if: github.ref == 'refs/heads/release'
if: github.ref == 'refs/heads/release' || github.event.pull_request.base.ref == 'release'
shell: bash
run: |
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
@ -199,7 +203,7 @@ jobs:
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:release
- name: Pull master server docker container and start it locally
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master'
shell: bash
run: |
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

View File

@ -7,3 +7,4 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
For details on setting up your development machine, please refer to the [Setup Guide](https://github.com/appsmithorg/appsmith/blob/release/contributions/ClientSetup.md)

View File

@ -20,6 +20,7 @@ echo "$APPSMITH_SSL_KEY" > ./docker/dev.appsmith.com-key.pem
echo "Going to run the nginx server"
sudo docker pull nginx:latest
sudo docker pull postgres:latest
sudo docker run --network host --name wildcard-nginx -d -p 80:80 -p 443:443 \
-v `pwd`/docker/nginx-root.conf:/etc/nginx/nginx.conf \
@ -34,8 +35,8 @@ sudo docker run --network host --name postgres -d -p 5432:5432 \
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 \
postgres:latest &
echo "Sleeping for 20 seconds to let the servers start"
sleep 20
echo "Sleeping for 30 seconds to let the servers start"
sleep 30
echo "Checking if the containers have started"
sudo docker ps -a