From 17bec866d4d31085a172a22ae057fc5d4fc2c929 Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Fri, 17 Dec 2021 11:53:26 +0300 Subject: [PATCH] Update build develop --- .github/workflows/_build_develop.yml | 114 --------------------------- .github/workflows/build_develop.yml | 60 ++++++++++++++ 2 files changed, 60 insertions(+), 114 deletions(-) delete mode 100644 .github/workflows/_build_develop.yml create mode 100644 .github/workflows/build_develop.yml diff --git a/.github/workflows/_build_develop.yml b/.github/workflows/_build_develop.yml deleted file mode 100644 index 26d840e5..00000000 --- a/.github/workflows/_build_develop.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: Build Develop - -on: - pull_request: - branches: - - main - paths: - - .github/workflows/build_develop.yml - - build/** - - installation/** - - tests/** - - .dockerignore - - docker-bake.hcl - - env-example - - schedule: - # Every day at 12:00 pm - - cron: 0 0 * * * - - workflow_dispatch: - -env: - IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} - -jobs: - build_bench: - name: Bench - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login - uses: docker/login-action@v1 - if: env.IS_AUTHORIZED_RUN == 'true' - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and test - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: bench-test - - - name: Push - uses: docker/bake-action@v1.6.0 - if: env.IS_AUTHORIZED_RUN == 'true' - with: - files: docker-bake.hcl - targets: bench - push: true - - build_main: - name: Frappe & ERPNext - runs-on: ubuntu-latest - services: - registry: - image: registry:2 - ports: - - 5000:5000 - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Buildx - uses: docker/setup-buildx-action@v1 - with: - driver-opts: network=host - - - name: Login - uses: docker/login-action@v1 - if: env.IS_AUTHORIZED_RUN == 'true' - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build Frappe - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-develop-test - load: true - - - name: Push Frappe to local registry - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-develop-test-local - push: true - - - name: Test Frappe - run: ./tests/test-frappe.sh - - - name: Build ERPNext - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: erpnext-develop-test - load: true - - - name: Test ERPNext - run: ./tests/test-erpnext.sh - - - name: Push - if: env.IS_AUTHORIZED_RUN == 'true' - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-develop,erpnext-develop - push: true diff --git a/.github/workflows/build_develop.yml b/.github/workflows/build_develop.yml new file mode 100644 index 00000000..7dffaa2a --- /dev/null +++ b/.github/workflows/build_develop.yml @@ -0,0 +1,60 @@ +name: Build Develop + +on: + push: + # pull_request: + # branches: + # - main + # paths: + # - .github/workflows/build_develop.yml + # - build/** + # - installation/** + # - tests/** + # - .dockerignore + # - docker-bake.hcl + # - env-example + + # schedule: + # # Every day at 12:00 pm + # - cron: 0 0 * * * + + # workflow_dispatch: + +jobs: + build_bench: + 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: + 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 + push: true + + build_main: + uses: vrslev/frappe_docker/.github/workflows/docker-build-push.yml@beautify + with: + repo: erpnext + version: develop + push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} + secrets: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}