mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 01:55:39 +00:00
Adjust docker labels to modern OCI schema (#7773)
* adapt namespace * add new labels * make baseimage available for labels * remove unneeded ending * ensure image name is correct for ghcrio * ensure the right outputs are used * fix reference * fix assigment * only push docker reg image if authd * swith back to env this gets provided by the version ci script * make repo targets changeable * make readable * revert ghcr.io change
This commit is contained in:
6
.github/scripts/version_check.py
vendored
6
.github/scripts/version_check.py
vendored
@ -10,6 +10,7 @@ tagged branch:
|
||||
|
||||
"""
|
||||
|
||||
import itertools
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
@ -198,10 +199,13 @@ if __name__ == '__main__':
|
||||
print(f"Version check passed for '{version}'!")
|
||||
print(f"Docker tags: '{docker_tags}'")
|
||||
|
||||
target_repos = [REPO.lower(), f'ghcr.io/{REPO.lower()}']
|
||||
|
||||
# Ref: https://getridbug.com/python/how-to-set-environment-variables-in-github-actions-using-python/
|
||||
with open(os.getenv('GITHUB_ENV'), 'a') as env_file:
|
||||
# Construct tag string
|
||||
tags = ','.join([f'{REPO.lower()}:{tag}' for tag in docker_tags])
|
||||
tag_list = [[f'{r}:{t}' for t in docker_tags] for r in target_repos]
|
||||
tags = ','.join(itertools.chain(*tag_list))
|
||||
|
||||
env_file.write(f'docker_tags={tags}\n')
|
||||
|
||||
|
Reference in New Issue
Block a user