mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Changes the intermediate image building steps to use registry caching, allowig us to always rebuild them, but do so very quickly when nothing has changed
This commit is contained in:
parent
d98bfa5bed
commit
66c7f44bea
5 changed files with 52 additions and 68 deletions
27
.github/scripts/common.py
vendored
Normal file
27
.github/scripts/common.py
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
def get_image_tag(
|
||||
repo_name: str,
|
||||
pkg_name: str,
|
||||
pkg_version: str,
|
||||
) -> str:
|
||||
"""
|
||||
Returns a string representing the normal image for a given package
|
||||
"""
|
||||
return f"ghcr.io/{repo_name}/builder/{pkg_name}:{pkg_version}"
|
||||
|
||||
|
||||
def get_cache_image_tag(
|
||||
repo_name: str,
|
||||
pkg_name: str,
|
||||
pkg_version: str,
|
||||
branch_name: str,
|
||||
) -> str:
|
||||
"""
|
||||
Returns a string representing the expected image cache tag for a given package
|
||||
|
||||
Registry type caching is utilized for the builder images, to allow fast
|
||||
rebuilds, generally almost instant for the same version
|
||||
"""
|
||||
return f"ghcr.io/{repo_name}/builder/cache/{pkg_name}:{pkg_version}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue