From 3ec01a6fe5accee47bad23ef6bc01fa1a5becde7 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 11 Jan 2021 11:24:53 +0000 Subject: [PATCH] Adding docker image release to release GH action. --- .github/workflows/release.yml | 9 +++++++++ hosting/scripts/linux/release-to-docker-hub.sh | 2 +- package.json | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 817cd17652..10beaf4fe6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,3 +61,12 @@ jobs: # macOS notarization API key API_KEY_ID: ${{ secrets.api_key_id }} API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }} + + - name: Build/release Docker images + uses: actions/checkout@v2 + env: + DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + run: yarn build:docker diff --git a/hosting/scripts/linux/release-to-docker-hub.sh b/hosting/scripts/linux/release-to-docker-hub.sh index bbe2d773f9..b1921916e4 100755 --- a/hosting/scripts/linux/release-to-docker-hub.sh +++ b/hosting/scripts/linux/release-to-docker-hub.sh @@ -1,5 +1,5 @@ #!/bin/bash -pushd ../build +pushd ../../build docker-compose build --force app-service docker-compose build --force worker-service docker tag build_app-service budibase/budibase-apps:latest diff --git a/package.json b/package.json index d58e36517d..fd601dd099 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "lint:fix": "eslint --fix packages", "format": "prettier --write \"{,!(node_modules)/**/}*.{js,jsx,svelte}\"", "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 -" }, "dependencies": { "@fortawesome/fontawesome": "^1.1.8"