2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 22:31:07 +00:00
frappe_docker/.github/workflows/build_develop.yml
2021-11-06 20:01:55 +03:00

133 lines
3.1 KiB
YAML

name: Build Develop
on:
push:
pull_request:
branches:
- main
paths:
- .github/**
- build/**
- installation/**
- tests/**
- .dockerignore
- docker-bake.hcl
- docker-compose.yml
- env*
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
push: false
build_frappe:
name: Frappe
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
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
targets: frappe-develop-test
load: true
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
- name: Test
run: ./tests/test-frappe.sh
- name: Push
# if: env.IS_AUTHORIZED_RUN == 'true'
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
targets: frappe-develop
# push: true
push: false
build_erpnext:
name: ERPNext
runs-on: ubuntu-latest
needs: build_frappe
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
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
targets: erpnext-develop-test
load: true
- name: Test
run: FRAPPE_VERSION=develop ./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: erpnext-develop
# push: true
push: false