From deacf207ffd65250890b494fc2b11ed14b3000d6 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 29 May 2022 13:47:29 +1000 Subject: [PATCH] Docker Build Fixes (#3093) * Docker: Require libffi-dev * set push to true * debug * Check GITHUB_BASE_REF also --- .github/workflows/docker.yaml | 2 +- ci/check_version_number.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index b9f895983d..bc835efb98 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -63,7 +63,7 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: false + push: true target: production tags: inventree/inventree:${{ env.docker_tag }} build-args: commit_hash=${{ env.git_commit_hash }},commit_date=${{ env.git_commit_date }},commit_tag=${{ env.docker_tag }} diff --git a/ci/check_version_number.py b/ci/check_version_number.py index da86d4a5ad..27120ff55a 100644 --- a/ci/check_version_number.py +++ b/ci/check_version_number.py @@ -28,6 +28,8 @@ if __name__ == '__main__': # GITHUB_REF may be either 'refs/heads/' or 'refs/heads/' GITHUB_REF = os.environ['GITHUB_REF'] + GITHUB_BASE_REF = os.environ['GITHUB_BASE_REF'] + version_file = os.path.join(here, '..', 'InvenTree', 'InvenTree', 'version.py') version = None @@ -50,7 +52,7 @@ if __name__ == '__main__': # Determine which docker tag we are going to use docker_tag = None - if GITHUB_REF_TYPE == 'branch' and 'stable' in GITHUB_REF: + if GITHUB_REF_TYPE == 'branch' and ('stable' in GITHUB_REF or 'stable' in GITHUB_BASE_REF): print("Checking requirements for 'stable' release") pattern = r"^\d+(\.\d+)+$" @@ -64,7 +66,7 @@ if __name__ == '__main__': docker_tag = 'stable' - elif GITHUB_REF_TYPE == 'branch' and ('master' in GITHUB_REF or 'main' in GITHUB_REF): + elif GITHUB_REF_TYPE == 'branch' and ('master' in GITHUB_REF or 'master' in GITHUB_BASE_REF): print("Checking requirements for main development branch:") pattern = r"^\d+(\.\d+)+ dev$" @@ -95,6 +97,7 @@ if __name__ == '__main__': print("Unsupported branch / version combination:") print(f"InvenTree Version: {version}") print("GITHUB_REF_TYPE:", GITHUB_REF_TYPE) + print("GITHUB_BASE_REF:", GITHUB_BASE_REF) print("GITHUB_REF:", GITHUB_REF) sys.exit(1)