2021-10-31 05:32:58 +00:00
|
|
|
name: Build Develop
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2021-11-26 14:22:17 +00:00
|
|
|
- .github/workflows/build_develop.yml
|
2021-10-31 05:32:58 +00:00
|
|
|
- build/**
|
|
|
|
- installation/**
|
|
|
|
- tests/**
|
|
|
|
- .dockerignore
|
|
|
|
- docker-bake.hcl
|
2021-11-26 14:22:17 +00:00
|
|
|
- env-example
|
2021-10-31 05:32:58 +00:00
|
|
|
|
|
|
|
schedule:
|
2021-11-04 12:31:49 +00:00
|
|
|
# Every day at 12:00 pm
|
2021-10-31 05:32:58 +00:00
|
|
|
- cron: 0 0 * * *
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
env:
|
|
|
|
IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
|
2021-10-31 05:32:58 +00:00
|
|
|
jobs:
|
|
|
|
build_bench:
|
2021-11-04 12:31:49 +00:00
|
|
|
name: Bench
|
2021-10-31 05:32:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Login
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Build and test
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-04 12:31:49 +00:00
|
|
|
targets: bench-test
|
|
|
|
|
|
|
|
- name: Push
|
|
|
|
uses: docker/bake-action@v1.6.0
|
2021-11-06 17:02:42 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-11-04 12:31:49 +00:00
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
|
|
|
targets: bench-build
|
2021-11-06 17:02:42 +00:00
|
|
|
push: true
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
build_main:
|
|
|
|
name: Frappe & ERPNext
|
2021-10-31 05:32:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-11-23 23:40:27 +00:00
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
2021-10-31 05:32:58 +00:00
|
|
|
steps:
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Setup Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2021-11-23 23:40:27 +00:00
|
|
|
with:
|
|
|
|
driver-opts: network=host
|
2021-11-04 12:31:49 +00:00
|
|
|
|
|
|
|
- name: Login
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Build Frappe
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-04 12:31:49 +00:00
|
|
|
targets: frappe-develop-test
|
2021-10-31 05:32:58 +00:00
|
|
|
load: true
|
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Push Frappe to local registry
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-23 23:40:27 +00:00
|
|
|
targets: frappe-develop-test-local
|
2021-11-06 17:02:42 +00:00
|
|
|
push: true
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Test Frappe
|
|
|
|
run: ./tests/test-frappe.sh
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Build ERPNext
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-04 12:31:49 +00:00
|
|
|
targets: erpnext-develop-test
|
|
|
|
load: true
|
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Test ERPNext
|
|
|
|
run: ./tests/test-erpnext.sh
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Push
|
2021-11-06 17:02:42 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-23 23:40:27 +00:00
|
|
|
targets: frappe-develop,erpnext-develop
|
2021-11-06 17:02:42 +00:00
|
|
|
push: true
|