From 3c0f08652ecf9c322eaf95b7bb5a47e1b97a465f Mon Sep 17 00:00:00 2001 From: Lev Date: Thu, 4 Nov 2021 15:24:08 +0300 Subject: [PATCH 1/2] ci: Push images right after build This fixes the bug when ERPNext images are built upon old Frappe images and test are ran on old images --- .github/workflows/build_develop.yml | 18 ++-------------- .github/workflows/build_stable.yml | 32 ++--------------------------- 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build_develop.yml b/.github/workflows/build_develop.yml index a4ee5a29..b89c1a76 100644 --- a/.github/workflows/build_develop.yml +++ b/.github/workflows/build_develop.yml @@ -60,6 +60,7 @@ jobs: files: docker-bake.hcl targets: frappe-develop load: true + push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} - name: Build ERPNext images uses: docker/bake-action@v1.6.0 @@ -67,22 +68,7 @@ jobs: files: docker-bake.hcl targets: erpnext-develop load: true + push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} - 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 diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index 8c615286..367987a2 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -48,6 +48,7 @@ jobs: files: docker-bake.hcl targets: frappe-stable load: true + push: true - name: Setup ERPNext variables run: ./.github/scripts/get-latest-tag.sh @@ -61,41 +62,12 @@ jobs: files: docker-bake.hcl targets: erpnext-stable load: true + push: true - name: Test if: ${{ matrix.version != 12 }} run: ./.github/scripts/install-deps-and-test.sh - - name: Setup Frappe variables - if: github.repository == 'frappe/frappe_docker' - run: ./.github/scripts/get-latest-tag.sh - env: - REPO: frappe/frappe - VERSION: ${{ matrix.version }} - - - name: Push Frappe images - if: github.repository == 'frappe/frappe_docker' - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-stable - push: true - - - name: Setup ERPNext variables - if: github.repository == 'frappe/frappe_docker' - run: ./.github/scripts/get-latest-tag.sh - env: - REPO: frappe/erpnext - VERSION: ${{ matrix.version }} - - - name: Push ERPNext images - if: github.repository == 'frappe/frappe_docker' - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: erpnext-stable - push: true - - name: Setup Helm deploy key if: github.repository == 'frappe/frappe_docker' uses: webfactory/ssh-agent@v0.5.3 From de255d805278a94eeb341a137ac3ff547ba30986 Mon Sep 17 00:00:00 2001 From: Lev Date: Thu, 4 Nov 2021 19:00:16 +0300 Subject: [PATCH 2/2] ci: Fix stable build --- .github/workflows/build_stable.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index 367987a2..cda94413 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -47,7 +47,6 @@ jobs: with: files: docker-bake.hcl targets: frappe-stable - load: true push: true - name: Setup ERPNext variables @@ -61,7 +60,6 @@ jobs: with: files: docker-bake.hcl targets: erpnext-stable - load: true push: true - name: Test