1
1
.PHONY :
2
2
clean-registry-untagged : \
3
3
$(HELPER ) /var/lib/uniget/manifests/gh.json \
4
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
4
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # Remove all untagged container images
5
5
@set -o errexit; \
6
6
if test -z " $$ {GH_TOKEN}" && ! test -f " $$ {HOME}/.config/gh/hosts.yml" ; then \
7
7
echo " ### Error: Need GH_TOKEN or configured gh." ; \
@@ -21,7 +21,7 @@ clean-registry-untagged: \
21
21
.PHONY :
22
22
clean-registry-untagged--% : \
23
23
$(HELPER ) /var/lib/uniget/manifests/gh.json \
24
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
24
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # Remove a tag on all container images
25
25
@set -o errexit; \
26
26
if test -z " $$ {GH_TOKEN}" && ! test -f " $$ {HOME}/.config/gh/hosts.yml" ; then \
27
27
echo " ### Error: Need GH_TOKEN or configured gh." ; \
@@ -38,7 +38,7 @@ clean-registry-untagged--%: \
38
38
.PHONY :
39
39
clean-ghcr-unused--% : \
40
40
$(HELPER ) /var/lib/uniget/manifests/gh.json \
41
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
41
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # ???
42
42
@set -o errexit; \
43
43
if test -z " $$ {GH_TOKEN}" && ! test -f " $$ {HOME}/.config/gh/hosts.yml" ; then \
44
44
echo " ### Error: Need GH_TOKEN or configured gh." ; \
@@ -58,7 +58,7 @@ clean-ghcr-unused--%: \
58
58
.PHONY :
59
59
ghcr-orphaned : \
60
60
$(HELPER ) /var/lib/uniget/manifests/gh.json \
61
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
61
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # List container image without a tools/<tool>/manifest.yaml
62
62
@set -o errexit; \
63
63
gh api --paginate /users/$(OWNER ) /packages? package_type=container | jq --raw-output ' .[].name' \
64
64
| cut -d/ -f2 \
@@ -73,17 +73,17 @@ ghcr-orphaned: \
73
73
74
74
.PHONY :
75
75
ghcr-exists--% : \
76
- $(HELPER ) /var/lib/uniget/manifests/gh.json
76
+ $(HELPER ) /var/lib/uniget/manifests/gh.json # # Check if a container image exists
77
77
@gh api --paginate " users/$( OWNER) /packages/container/uniget%2F$* " > /dev/null 2>&1
78
78
79
79
.PHONY :
80
80
ghcr-exists : \
81
- $(addprefix ghcr-exists--,$(TOOLS_RAW ) )
81
+ $(addprefix ghcr-exists--,$(TOOLS_RAW ) ) # # Check if all container images exist
82
82
83
83
.PHONY :
84
84
ghcr-inspect : \
85
85
$(HELPER ) /var/lib/uniget/manifests/gh.json \
86
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
86
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # List tags for all container images
87
87
@set -o errexit; \
88
88
gh api --paginate /users/$(OWNER ) /packages? package_type=container | jq --raw-output ' .[].name' \
89
89
| while read NAME; do \
@@ -95,7 +95,7 @@ ghcr-inspect: \
95
95
.PHONY :
96
96
$(addsuffix --ghcr-tags,$(ALL_TOOLS_RAW ) ) :% --ghcr-tags: \
97
97
$(HELPER ) /var/lib/uniget/manifests/gh.json \
98
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
98
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # Display tags for a container image
99
99
@set -o errexit; \
100
100
gh api --paginate " users/$( OWNER) /packages/container/uniget%2F$* /versions" \
101
101
| jq --raw-output ' .[] | "\(.metadata.container.tags[]);\(.name);\(.id)"' \
@@ -104,7 +104,7 @@ $(addsuffix --ghcr-tags,$(ALL_TOOLS_RAW)):%--ghcr-tags: \
104
104
.PHONY :
105
105
$(addsuffix --ghcr-inspect,$(ALL_TOOLS_RAW ) ) :% --ghcr-inspect: \
106
106
$(HELPER ) /var/lib/uniget/manifests/gh.json \
107
- $(HELPER ) /var/lib/uniget/manifests/yq.json
107
+ $(HELPER ) /var/lib/uniget/manifests/yq.json # # Display API object for a container image
108
108
@set -o errexit; \
109
109
gh api --paginate " users/$( OWNER) /packages/container/uniget%2F$* " \
110
110
| yq --prettyPrint
@@ -113,7 +113,7 @@ $(addsuffix --ghcr-inspect,$(ALL_TOOLS_RAW)):%--ghcr-inspect: \
113
113
$(addsuffix --ghcr-delete-test,$(ALL_TOOLS_RAW ) ) :% --ghcr-delete-test: \
114
114
$(HELPER ) /var/lib/uniget/manifests/gh.json \
115
115
$(HELPER ) /var/lib/uniget/manifests/yq.json \
116
- ; $(info $(M ) Removing tag test from tool $* ...)
116
+ ; $(info $(M ) Removing tag test from tool $* ...) # # ???
117
117
@\
118
118
helper/usr/local/bin/gh api --paginate " users/$( OWNER) /packages/container/uniget%2F$* /versions" \
119
119
| jq --raw-output ' .[] | select(.metadata.container.tags[] | contains("test")) | .id' \
@@ -123,7 +123,7 @@ $(addsuffix --ghcr-delete-test,$(ALL_TOOLS_RAW)):%--ghcr-delete-test: \
123
123
.PHONY :
124
124
delete-ghcr--% : \
125
125
$(HELPER ) /var/lib/uniget/manifests/gh.json \
126
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
126
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # Delete container image
127
127
@set -o errexit; \
128
128
if test -z " $$ {GH_TOKEN}" && ! test -f " $$ {HOME}/.config/gh/hosts.yml" ; then \
129
129
echo " ### Error: Need GH_TOKEN or configured gh." ; \
@@ -141,7 +141,7 @@ delete-ghcr--%: \
141
141
.PHONY :
142
142
ghcr-private : \
143
143
$(HELPER ) /var/lib/uniget/manifests/gh.json \
144
- $(HELPER ) /var/lib/uniget/manifests/gojq.json
144
+ $(HELPER ) /var/lib/uniget/manifests/gojq.json # # List all private container images
145
145
@set -o errexit; \
146
146
gh api --paginate " users/$( OWNER) /packages?package_type=container&visibility=private" \
147
147
| jq ' .[] | "\(.name);\(.html_url)"' \
@@ -151,6 +151,6 @@ ghcr-private: \
151
151
$(addsuffix --ghcr-private,$(ALL_TOOLS_RAW ) ) : \
152
152
$(HELPER ) /var/lib/uniget/manifests/gh.json \
153
153
$(HELPER ) /var/lib/uniget/manifests/gojq.json \
154
- ; $(info $(M ) Testing that $* is publicly visible...)
154
+ ; $(info $(M ) Testing that $* is publicly visible...) # # ???
155
155
@gh api " users/$( OWNER) /packages/container/uniget%2F$* " \
156
156
| jq --exit-status ' select(.visibility == "public")' > /dev/null 2>&1
0 commit comments