build: Change bench target names and move CI to separate workflow (#655)

* Change bench target names and move CI to separate workflow

* Fix file detection
This commit is contained in:
Lev
2022-02-08 11:35:52 +03:00
committed by GitHub
parent b02191f3f8
commit 05853825d8
4 changed files with 55 additions and 40 deletions

46
.github/workflows/build_bench.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Bench
on:
pull_request:
branches:
- main
paths:
- build/bench/**
- docker-bake.hcl
schedule:
# Every day at 12:00 pm
- cron: 0 0 * * *
workflow_dispatch:
jobs:
build:
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:
files: docker-bake.hcl
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
files: docker-bake.hcl
push: true