add support for staging image that gets built on master push
This commit is contained in:
parent
50e0f3e262
commit
c8b8ddb67f
|
@ -34,3 +34,12 @@ jobs:
|
||||||
CI: true
|
CI: true
|
||||||
name: Budibase CI
|
name: Budibase CI
|
||||||
- run: yarn test:e2e:ci
|
- run: yarn test:e2e:ci
|
||||||
|
|
||||||
|
- name: Build and Push Staging Docker Image
|
||||||
|
# Only run on push
|
||||||
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
|
run: yarn build:staging:docker
|
||||||
|
env:
|
||||||
|
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
tag=$1
|
||||||
|
tag=${tag:-latest}
|
||||||
|
|
||||||
pushd ../../build
|
pushd ../../build
|
||||||
docker-compose build --force app-service
|
docker-compose build --force app-service
|
||||||
docker-compose build --force worker-service
|
docker-compose build --force worker-service
|
||||||
docker tag build_app-service budibase/budibase-apps:latest
|
|
||||||
|
docker tag build_app-service budibase/budibase-apps:$tag
|
||||||
|
docker tag build_worker-service budibase/budibase-worker:$tag
|
||||||
|
|
||||||
docker push budibase/budibase-apps
|
docker push budibase/budibase-apps
|
||||||
docker tag build_worker-service budibase/budibase-worker:latest
|
|
||||||
docker push budibase/budibase-worker
|
docker push budibase/budibase-worker
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
"format": "prettier --write \"{,!(node_modules)/**/}*.{js,jsx,svelte}\"",
|
"format": "prettier --write \"{,!(node_modules)/**/}*.{js,jsx,svelte}\"",
|
||||||
"test:e2e": "lerna run cy:test",
|
"test:e2e": "lerna run cy:test",
|
||||||
"test:e2e:ci": "lerna run cy:ci",
|
"test:e2e:ci": "lerna run cy:ci",
|
||||||
"build:docker": "cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -"
|
"build:docker": "cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -",
|
||||||
|
"build:docker:staging": "cd hosting/scripts/linux/ && ./release-to-docker-hub.sh staging && cd -"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue