This fixes the bug when ERPNext images are built upon old Frappe images and test are ran on old images
75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
name: Build Develop
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/**
|
|
- build/**
|
|
- installation/**
|
|
- tests/**
|
|
- .dockerignore
|
|
- docker-bake.hcl
|
|
- docker-compose.yml
|
|
- env*
|
|
|
|
# Nightly builds at 12:00 am
|
|
schedule:
|
|
- cron: 0 0 * * *
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_bench:
|
|
name: Bench image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-bench
|
|
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
build_main:
|
|
name: Frappe and ERPNext images
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build Frappe images
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-develop
|
|
load: true
|
|
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
- name: Build ERPNext images
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: erpnext-develop
|
|
load: true
|
|
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
- name: Test
|
|
run: ./.github/scripts/install-deps-and-test.sh
|