docker build

This commit is contained in:
Jan Prochazka
2020-03-15 21:10:38 +01:00
parent 3a8c961920
commit 27a323f557
7 changed files with 66 additions and 56 deletions

View File

@@ -1,11 +1,11 @@
name: Docker image
on: [push]
# on:
# push:
# branches:
# - production
name: Electron app
on:
push:
branches:
- production
jobs:
build:
@@ -32,9 +32,21 @@ jobs:
- name: yarn install
run: |
yarn install
- name: Prepare docker image
- name: Publish
run: |
yarn run prepare:docker
- name: Build docker image
yarn run build:app
- name: Cleanup artifacts
run: |
docker build ./docker
npx rimraf "app/dist/!(*.exe|*.deb|*.AppImage|*.dmg)"
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}
path: app/dist
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "app/dist/**"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,9 +1,11 @@
name: Electron app
name: Docker image
on:
push:
branches:
- production
on: [push]
# on:
# push:
# branches:
# - production
jobs:
build:
@@ -30,21 +32,14 @@ jobs:
- name: yarn install
run: |
yarn install
- name: Publish
- name: Prepare docker image
run: |
yarn run build:app
- name: Cleanup artifacts
yarn run prepare:docker
- name: Build docker image
run: |
npx rimraf "app/dist/!(*.exe|*.deb|*.AppImage|*.dmg)"
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}
path: app/dist
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "app/dist/**"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker build ./docker -t dbgate:future
- name: Push docker image
run: |
docker tag dbgate:future dbgate/dbgate:future
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker push dbgate/dbgate:future