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
|
2023-09-05 21:54:07 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-02-08 08:35:52 +00:00
|
|
|
|
2022-04-03 13:18:36 +00:00
|
|
|
- name: Setup QEMU
|
2023-09-14 03:29:31 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
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
|
2023-09-12 16:40:06 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-02-08 08:35:52 +00:00
|
|
|
|
2023-06-26 06:24:37 +00:00
|
|
|
- name: Set Environment Variables
|
|
|
|
run: cat example.env | grep -o '^[^#]*' >> "$GITHUB_ENV"
|
|
|
|
|
2023-07-18 04:02:27 +00:00
|
|
|
- name: Get Bench Latest Version
|
|
|
|
run: echo "LATEST_BENCH_RELEASE=$(curl -s 'https://api.github.com/repos/frappe/bench/releases/latest' | jq -r '.tag_name')" >> "$GITHUB_ENV"
|
|
|
|
|
2022-02-08 08:35:52 +00:00
|
|
|
- name: Build and test
|
2024-08-14 06:15:45 +00:00
|
|
|
uses: docker/bake-action@v5.6.1
|
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' }}
|
2023-09-12 16:39:27 +00:00
|
|
|
uses: docker/login-action@v3
|
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' }}
|
2024-08-14 06:15:45 +00:00
|
|
|
uses: docker/bake-action@v5.6.1
|
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"
|