mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Adds a new workflow to cleanup image tags which no longer have an associated branch
This commit is contained in:
parent
72ee904e67
commit
0090e27699
3 changed files with 275 additions and 0 deletions
17
.github/scripts/common.py
vendored
17
.github/scripts/common.py
vendored
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
import logging
|
||||
from argparse import ArgumentError
|
||||
|
||||
|
||||
def get_image_tag(
|
||||
|
|
@ -25,3 +27,18 @@ def get_cache_image_tag(
|
|||
rebuilds, generally almost instant for the same version
|
||||
"""
|
||||
return f"ghcr.io/{repo_name}/builder/cache/{pkg_name}:{pkg_version}"
|
||||
|
||||
|
||||
def get_log_level(args) -> int:
|
||||
levels = {
|
||||
"critical": logging.CRITICAL,
|
||||
"error": logging.ERROR,
|
||||
"warn": logging.WARNING,
|
||||
"warning": logging.WARNING,
|
||||
"info": logging.INFO,
|
||||
"debug": logging.DEBUG,
|
||||
}
|
||||
level = levels.get(args.loglevel.lower())
|
||||
if level is None:
|
||||
raise ArgumentError(f"{args.loglevel} is not a valid level")
|
||||
return level
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue