fix(ci): Chart.yaml update bugs (#6808)
* fix(ci): Do not duplicate sources Signed-off-by: Dan Christensen <opello@opello.org> * fix(ci): Match chart against Markdown link text More specifically match the chart to the container in the website's description_list.md. Since multiple charts contain the term "plex" and not all of them are even Plex related, extraneous sources were being put in the plex Chart.yaml. Signed-off-by: Dan Christensen <opello@opello.org> --------- Signed-off-by: Dan Christensen <opello@opello.org>
This commit is contained in:
parent
05adde2be9
commit
b87f6893ad
|
@ -92,7 +92,7 @@ jobs:
|
||||||
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
||||||
# Add truechart source
|
# Add truechart source
|
||||||
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
||||||
container=$(cat website/docs/charts/description_list.md | grep "${chartname}" | cut -f3 -d '|' | grep -v 'Not Found' || echo "")
|
container=$(cat website/docs/charts/description_list.md | grep "\[${chartname}\]" | cut -f3 -d '|' | grep -v 'Not Found' || echo "")
|
||||||
if [ ! -z "$container" ]; then
|
if [ ! -z "$container" ]; then
|
||||||
prefix="https://hub.docker.com/"
|
prefix="https://hub.docker.com/"
|
||||||
if echo ${container} | grep 'ghcr'; then
|
if echo ${container} | grep 'ghcr'; then
|
||||||
|
@ -102,7 +102,7 @@ jobs:
|
||||||
elif echo ${container} | grep 'tccr'; then
|
elif echo ${container} | grep 'tccr'; then
|
||||||
prefix="https://github.com/truecharts/containers/tree/master/mirror/"
|
prefix="https://github.com/truecharts/containers/tree/master/mirror/"
|
||||||
fi
|
fi
|
||||||
container="${prefix}${container}" go-yq -i '.sources += env(container)' "${chart}/Chart.yaml"
|
container="${prefix}${container}" go-yq -i '.sources += env(container) | .sources |= unique' "${chart}/Chart.yaml"
|
||||||
fi
|
fi
|
||||||
# Add the rest of the sources
|
# Add the rest of the sources
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
|
|
Loading…
Reference in New Issue