feat: enable pre-commit on release pipeline and limit appversion length
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
concurrency: gitpush
|
concurrency: gitpush
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/truecharts/truecharts-release:v1.2.0
|
image: ghcr.io/truecharts/truecharts-release:v1.3.0
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ jobs:
|
|||||||
release-test:
|
release-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/truecharts/truecharts-release:v1.2.0
|
image: ghcr.io/truecharts/truecharts-release:v1.3.0
|
||||||
steps:
|
steps:
|
||||||
- name: Cache helm repo cache
|
- name: Cache helm repo cache
|
||||||
id: cache
|
id: cache
|
||||||
|
|||||||
@@ -122,20 +122,20 @@ sync_tag() {
|
|||||||
local chartname="$2"
|
local chartname="$2"
|
||||||
local train="$3"
|
local train="$3"
|
||||||
local chartversion="$4"
|
local chartversion="$4"
|
||||||
echo "Attempting to sync primary tag with Charts.yaml for: ${chartname}"
|
echo "Attempting to sync primary tag with appversion for: ${chartname}"
|
||||||
local tag="$(cat ${chart}/Values.yaml | grep "^ tag: " | awk -F" " '{ print $2 }')"
|
local tag="$(cat ${chart}/Values.yaml | grep "^ tag: " | awk -F" " '{ print $2 }')"
|
||||||
tag="${tag:-auto}"
|
tag="${tag:-auto}"
|
||||||
tag="${tag#*release-}"
|
tag="${tag#*release-}"
|
||||||
tag="${tag#*version-}"
|
tag="${tag#*version-}"
|
||||||
tag="${tag#*v}"
|
tag="${tag#*v}"
|
||||||
|
tag="${tag:0:10}"
|
||||||
sed -i -e "s|appVersion: .*|appVersion: ${tag}|" "${chart}/Chart.yaml"
|
sed -i -e "s|appVersion: .*|appVersion: ${tag}|" "${chart}/Chart.yaml"
|
||||||
}
|
}
|
||||||
|
|
||||||
pre_commit() {
|
pre_commit() {
|
||||||
if [[ -z "$standalone" ]]; then
|
if [[ -z "$standalone" ]]; then
|
||||||
echo "Running pre-commit test-and-cleanup..."
|
echo "Running pre-commit test-and-cleanup..."
|
||||||
# TO BE ENABLED
|
pre-commit run --all ||:
|
||||||
# pre-commit run --all ||:
|
|
||||||
# Fix sh files to always be executable
|
# Fix sh files to always be executable
|
||||||
find . -name '*.sh' | xargs chmod +x
|
find . -name '*.sh' | xargs chmod +x
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user