ci: Build fixes
- Simplify builds by separating dev/stable workflows - Fix Helm deploy key - Remove deploy_key.env (already using deploy key in secrets) - Fix paths matching on push and pull_request triggers - Fix possible issues with tag difference between ERPNext and Frappe (add tag resolving step before pushing) - Don't login, push Docker images and release Helm chart on forks - Don't test on version 12 (there's no test for this version) - Remove frappe-installer (from chore: use github actions #525) - Fix badges in readme
This commit is contained in:
88
.github/workflows/build_develop.yml
vendored
Normal file
88
.github/workflows/build_develop.yml
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
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
|
||||
|
||||
- name: Build ERPNext images
|
||||
uses: docker/bake-action@v1.6.0
|
||||
with:
|
||||
files: docker-bake.hcl
|
||||
targets: erpnext-develop
|
||||
load: true
|
||||
|
||||
- name: Test
|
||||
run: ./.github/scripts/install-deps-and-test.sh
|
||||
|
||||
- name: Push Frappe images
|
||||
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
||||
uses: docker/bake-action@v1.6.0
|
||||
with:
|
||||
files: docker-bake.hcl
|
||||
targets: frappe-develop
|
||||
push: true
|
||||
|
||||
- name: Push ERPNext images
|
||||
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
||||
uses: docker/bake-action@v1.6.0
|
||||
with:
|
||||
files: docker-bake.hcl
|
||||
targets: erpnext-develop
|
||||
push: true
|
||||
Reference in New Issue
Block a user