add develop tag and update docker push script

This commit is contained in:
Martin McKeaveney 2021-06-21 16:25:12 +01:00
parent 5d0a5b6217
commit f4c74b0ee2
5 changed files with 9 additions and 9 deletions

View File

@ -43,13 +43,13 @@ jobs:
verbose: true
- run: yarn test:e2e:ci
- name: Build and Push Staging Docker Image
- name: Build and Push Development Docker Image
# Only run on push
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
yarn build
yarn build:docker:staging
yarn build:docker:develop
env:
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}

View File

@ -5,12 +5,12 @@ tag=${tag:-latest}
echo "Tagging images with SHA: $GITHUB_SHA and tag: $tag"
docker tag app-service budibase/apps:$tag
docker tag worker-service budibase/worker:$tag
docker tag app-service:$tag budibase/apps:$tag
docker tag worker-service:$tag budibase/worker:$tag
# Tag with git sha
docker tag app-service budibase/apps:$GITHUB_SHA
docker tag worker-service budibase/worker:$GITHUB_SHA
docker tag app-service:$tag budibase/apps:$GITHUB_SHA
docker tag worker-service:$tag budibase/worker:$GITHUB_SHA
docker push budibase/apps
docker push budibase/worker

View File

@ -41,6 +41,6 @@
"test:e2e": "lerna run cy:test",
"test:e2e:ci": "lerna run cy:ci",
"build:docker": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -",
"build:docker:staging": "lerna run build:docker:staging && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh staging && cd -"
"build:docker:develop": "lerna run build:docker:develop && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -"
}
}

View File

@ -13,7 +13,7 @@
"test:integration": "jest --coverage --detectOpenHandles",
"test:watch": "jest --watch",
"build:docker": "docker build . -t app-service",
"build:docker:staging": "docker build . -t app-service:staging",
"build:docker:develop": "docker build . -t app-service:develop",
"run:docker": "node src/index",
"dev:stack:up": "node scripts/dev/manage.js up",
"dev:stack:down": "node scripts/dev/manage.js down",

View File

@ -14,7 +14,7 @@
"scripts": {
"run:docker": "node src/index.js",
"build:docker": "docker build . -t worker-service",
"build:docker:staging": "docker build . -t worker-service:staging",
"build:docker:develop": "docker build . -t worker-service:develop",
"dev:stack:init": "node ./scripts/dev/manage.js init",
"dev:builder": "npm run dev:stack:init && nodemon src/index.js",
"test": "jest --runInBand"