mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-08 14:21:05 +00:00
115 lines
2.6 KiB
YAML
115 lines
2.6 KiB
YAML
name: Build Develop
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/workflows/build_develop.yml
|
|
- build/**
|
|
- installation/**
|
|
- tests/**
|
|
- .dockerignore
|
|
- docker-bake.hcl
|
|
- env-example
|
|
|
|
schedule:
|
|
# Every day at 12:00 pm
|
|
- cron: 0 0 * * *
|
|
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
jobs:
|
|
build_bench:
|
|
name: Bench
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login
|
|
uses: docker/login-action@v1
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and test
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: bench-test
|
|
|
|
- name: Push
|
|
uses: docker/bake-action@v1.6.0
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: bench-build
|
|
push: true
|
|
|
|
build_main:
|
|
name: Frappe & ERPNext
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
registry:
|
|
image: registry:2
|
|
ports:
|
|
- 5000:5000
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
driver-opts: network=host
|
|
|
|
- name: Login
|
|
uses: docker/login-action@v1
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build Frappe
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-develop-test
|
|
load: true
|
|
|
|
- name: Push Frappe to local registry
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-develop-test-local
|
|
push: true
|
|
|
|
- name: Test Frappe
|
|
run: ./tests/test-frappe.sh
|
|
|
|
- name: Build ERPNext
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: erpnext-develop-test
|
|
load: true
|
|
|
|
- name: Test ERPNext
|
|
run: ./tests/test-erpnext.sh
|
|
|
|
- name: Push
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-develop,erpnext-develop
|
|
push: true
|