2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-24 23:58:27 +00:00

Update build develop

This commit is contained in:
Lev Vereshchagin 2021-12-17 11:53:26 +03:00
parent 4e142b3e26
commit 17bec866d4
2 changed files with 60 additions and 114 deletions

View File

@ -1,114 +0,0 @@
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
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

60
.github/workflows/build_develop.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Build Develop
on:
push:
# 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:
jobs:
build_bench:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Build and test
uses: docker/bake-action@v1.6.0
with:
targets: bench-test
- name: Login
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
uses: docker/bake-action@v1.6.0
with:
targets: bench
push: true
build_main:
uses: vrslev/frappe_docker/.github/workflows/docker-build-push.yml@beautify
with:
repo: erpnext
version: develop
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}