mirror of
https://github.com/truecharts/charts.git
synced 2026-07-09 12:05:19 -03:00
feat: enable pre-commit on release pipeline and limit appversion length
This commit is contained in:
2
.github/workflows/apps.release.yaml
vendored
2
.github/workflows/apps.release.yaml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
concurrency: gitpush
|
||||
container:
|
||||
image: ghcr.io/truecharts/truecharts-release:v1.2.0
|
||||
image: ghcr.io/truecharts/truecharts-release:v1.3.0
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
2
.github/workflows/apps.test.yaml
vendored
2
.github/workflows/apps.test.yaml
vendored
@@ -196,7 +196,7 @@ jobs:
|
||||
release-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/truecharts/truecharts-release:v1.2.0
|
||||
image: ghcr.io/truecharts/truecharts-release:v1.3.0
|
||||
steps:
|
||||
- name: Cache helm repo cache
|
||||
id: cache
|
||||
|
||||
@@ -122,20 +122,20 @@ sync_tag() {
|
||||
local chartname="$2"
|
||||
local train="$3"
|
||||
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 }')"
|
||||
tag="${tag:-auto}"
|
||||
tag="${tag#*release-}"
|
||||
tag="${tag#*version-}"
|
||||
tag="${tag#*v}"
|
||||
tag="${tag:0:10}"
|
||||
sed -i -e "s|appVersion: .*|appVersion: ${tag}|" "${chart}/Chart.yaml"
|
||||
}
|
||||
|
||||
pre_commit() {
|
||||
if [[ -z "$standalone" ]]; then
|
||||
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
|
||||
find . -name '*.sh' | xargs chmod +x
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user