Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Backend

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
dockerfile: backend/Dockerfile
username: ${{ github.actor }}
password: ${{ github.token }}
registry: docker.pkg.github.com/polycortex/polydodo
repository: backend
tags: latest
45 changes: 45 additions & 0 deletions .github/workflows/mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Mobile

on:
push:
branches:
- master
pull_request:
branches:
- master

defaults:
run:
working-directory: mobile

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v1
- uses: abelfodil/protoc-action@v1
with:
enable-dart: true

- run: protoc --proto_path=protos protos/* --dart_out=mobile/lib/protos
working-directory: .

- run: flutter pub get

- run: flutter test

- run: flutter build apk
- uses: actions/upload-artifact@v2
with:
name: Android app
path: mobile/build/app/outputs/flutter-apk/app-release.apk

- run: flutter build ios --release --no-codesign
- uses: actions/upload-artifact@v2
with:
name: iOS app
path: mobile/build/ios/iphoneos/Runner.app
38 changes: 38 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Web

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: abelfodil/protoc-action@v1
- uses: borales/actions-yarn@v2.3.0
with:
cmd: --cwd web install
- run: protoc --proto_path=protos protos/* --js_out=web/src/protos
- uses: borales/actions-yarn@v2.3.0
with:
cmd: --cwd web build

release:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
dockerfile: web/Dockerfile
username: ${{ github.actor }}
password: ${{ github.token }}
registry: docker.pkg.github.com/polycortex/polydodo
repository: web
tags: latest
11 changes: 11 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM namely/protoc-all as generator
WORKDIR /
COPY protos protos
COPY backend backend
RUN protoc --proto_path=protos protos/* --python_out=backend/protos

FROM python
COPY --from=generator /backend /backend
WORKDIR /backend
RUN pip install -r requirements.txt --no-cache-dir
ENTRYPOINT ["python", "app.py"]
14 changes: 14 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM namely/protoc-all as generator
WORKDIR /
COPY protos protos
COPY web web
RUN protoc --proto_path=protos protos/* --js_out=web/src/protos

FROM node:14 as builder
COPY --from=generator /web /web
WORKDIR /web
RUN yarn install
RUN yarn build

FROM nginx:alpine
COPY --from=builder /web/build/ /usr/share/nginx/html