mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Docker Build Fixes (#3093)
* Docker: Require libffi-dev * set push to true * debug * Check GITHUB_BASE_REF also
This commit is contained in:
parent
1f6b81745d
commit
deacf207ff
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
@ -63,7 +63,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
push: false
|
push: true
|
||||||
target: production
|
target: production
|
||||||
tags: inventree/inventree:${{ env.docker_tag }}
|
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 }}
|
build-args: commit_hash=${{ env.git_commit_hash }},commit_date=${{ env.git_commit_date }},commit_tag=${{ env.docker_tag }}
|
||||||
|
@ -28,6 +28,8 @@ if __name__ == '__main__':
|
|||||||
# GITHUB_REF may be either 'refs/heads/<branch>' or 'refs/heads/<tag>'
|
# GITHUB_REF may be either 'refs/heads/<branch>' or 'refs/heads/<tag>'
|
||||||
GITHUB_REF = os.environ['GITHUB_REF']
|
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_file = os.path.join(here, '..', 'InvenTree', 'InvenTree', 'version.py')
|
||||||
|
|
||||||
version = None
|
version = None
|
||||||
@ -50,7 +52,7 @@ if __name__ == '__main__':
|
|||||||
# Determine which docker tag we are going to use
|
# Determine which docker tag we are going to use
|
||||||
docker_tag = None
|
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")
|
print("Checking requirements for 'stable' release")
|
||||||
|
|
||||||
pattern = r"^\d+(\.\d+)+$"
|
pattern = r"^\d+(\.\d+)+$"
|
||||||
@ -64,7 +66,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
docker_tag = 'stable'
|
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:")
|
print("Checking requirements for main development branch:")
|
||||||
|
|
||||||
pattern = r"^\d+(\.\d+)+ dev$"
|
pattern = r"^\d+(\.\d+)+ dev$"
|
||||||
@ -95,6 +97,7 @@ if __name__ == '__main__':
|
|||||||
print("Unsupported branch / version combination:")
|
print("Unsupported branch / version combination:")
|
||||||
print(f"InvenTree Version: {version}")
|
print(f"InvenTree Version: {version}")
|
||||||
print("GITHUB_REF_TYPE:", GITHUB_REF_TYPE)
|
print("GITHUB_REF_TYPE:", GITHUB_REF_TYPE)
|
||||||
|
print("GITHUB_BASE_REF:", GITHUB_BASE_REF)
|
||||||
print("GITHUB_REF:", GITHUB_REF)
|
print("GITHUB_REF:", GITHUB_REF)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user