2022-02-08 08:35:52 +00:00
|
|
|
name: Bench
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2022-03-14 05:53:03 +00:00
|
|
|
- images/bench/**
|
2022-02-08 08:35:52 +00:00
|
|
|
- docker-bake.hcl
|
2022-03-14 10:20:39 +00:00
|
|
|
- .github/workflows/build_bench.yml
|
2022-02-08 08:35:52 +00:00
|
|
|
|
|
|
|
schedule:
|
|
|
|
# Every day at 12:00 pm
|
|
|
|
- cron: 0 0 * * *
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-04 19:35:27 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-02-08 08:35:52 +00:00
|
|
|
|
2022-04-03 13:18:36 +00:00
|
|
|
- name: Setup QEMU
|
2022-05-06 15:23:28 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-04-03 13:18:36 +00:00
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
2022-02-08 08:35:52 +00:00
|
|
|
- name: Setup Buildx
|
2022-05-06 15:24:44 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-02-08 08:35:52 +00:00
|
|
|
|
|
|
|
- name: Build and test
|
2022-07-21 00:31:30 +00:00
|
|
|
uses: docker/bake-action@v2.2.0
|
2022-02-08 08:35:52 +00:00
|
|
|
with:
|
|
|
|
targets: bench-test
|
|
|
|
|
|
|
|
- name: Login
|
|
|
|
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2022-05-06 15:23:47 +00:00
|
|
|
uses: docker/login-action@v2
|
2022-02-08 08:35:52 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Push
|
|
|
|
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2022-07-21 00:31:30 +00:00
|
|
|
uses: docker/bake-action@v2.2.0
|
2022-02-08 08:35:52 +00:00
|
|
|
with:
|
|
|
|
targets: bench
|
|
|
|
push: true
|
2022-04-03 13:18:36 +00:00
|
|
|
set: "*.platform=linux/amd64,linux/arm64"
|