feat(ci): copy a docker-hub locked version to a seperate catalog repo for chinese users
This commit is contained in:
@@ -28,6 +28,13 @@ jobs:
|
|||||||
token: ${{ secrets.BOT_TOKEN }}
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
path: catalog
|
path: catalog
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3
|
||||||
|
with:
|
||||||
|
repository: truecharts/dh_catalog
|
||||||
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
|
path: dh_catalog
|
||||||
|
|
||||||
- name: build-and-run
|
- name: build-and-run
|
||||||
run: |
|
run: |
|
||||||
tools/build-release.sh -p --config .github/cr.yaml
|
tools/build-release.sh -p --config .github/cr.yaml
|
||||||
@@ -50,3 +57,12 @@ jobs:
|
|||||||
git add --all
|
git add --all
|
||||||
git commit -sm "Commit new App releases for TrueCharts" || exit 0
|
git commit -sm "Commit new App releases for TrueCharts" || exit 0
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
- name: Commit and Push new Docker-hub-locked App releases
|
||||||
|
run: |
|
||||||
|
cd dh_catalog
|
||||||
|
git config user.name "TrueCharts-Bot"
|
||||||
|
git config user.email "bot@truecharts.org"
|
||||||
|
git add --all
|
||||||
|
git commit -sm "Commit new App releases for TrueCharts" || exit 0
|
||||||
|
git push
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ main() {
|
|||||||
pre_commit
|
pre_commit
|
||||||
validate_catalog
|
validate_catalog
|
||||||
if [ "${production}" == "true" ]; then
|
if [ "${production}" == "true" ]; then
|
||||||
|
gen_dh_cat
|
||||||
release_charts
|
release_charts
|
||||||
update_index
|
update_index
|
||||||
fi
|
fi
|
||||||
@@ -273,6 +274,16 @@ clean_catalog() {
|
|||||||
}
|
}
|
||||||
export -f clean_catalog
|
export -f clean_catalog
|
||||||
|
|
||||||
|
gen_dh_cat() {
|
||||||
|
rm -rf dh_catalog/*.*
|
||||||
|
rm -rf dh_catalog/*
|
||||||
|
cp -rf catalog/* dh_catalog
|
||||||
|
cd dh_catalog
|
||||||
|
find ./ -type f -name *.yaml -exec sed -i 's/tccr.io/dh.tccr.io/gI' {} \
|
||||||
|
cd -
|
||||||
|
}
|
||||||
|
export -f gen_dh_cat
|
||||||
|
|
||||||
# Designed to ensure the appversion in Chart.yaml is in sync with the primary App tag if found
|
# Designed to ensure the appversion in Chart.yaml is in sync with the primary App tag if found
|
||||||
sync_tag() {
|
sync_tag() {
|
||||||
local chart="$1"
|
local chart="$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user