mirror of
https://github.com/truecharts/charts.git
synced 2026-07-08 14:44:27 -03:00
chore(ci): Add some checks to tc-lint.sh and update chart-tests to GITHUB_OUTPUT (#9289)
**Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._
This commit is contained in:
29
.github/scripts/tc-lint.sh
vendored
29
.github/scripts/tc-lint.sh
vendored
@@ -15,7 +15,7 @@ function check_version() {
|
||||
if [[ -n "$new" ]]; then
|
||||
echo -e "\t🔙 Old Chart Version: $old"
|
||||
echo -e "\t🆕 New Chart Version: $new"
|
||||
|
||||
|
||||
if [[ $(echo "$new\n$old" | sort -V -r | head -n1) != "$old" ]]; then
|
||||
echo -e "\t✅ Chart version: Bumped"
|
||||
else
|
||||
@@ -142,6 +142,33 @@ exit_code=0
|
||||
|
||||
result_file=${result_file:?"No result file provided"}
|
||||
|
||||
rm -f "$status_file"
|
||||
rm -f "$status_file"
|
||||
|
||||
command -v yamale >/dev/null 2>&1 || {
|
||||
printf >&2 "%s\n" "yamale (https://github.com/23andMe/Yamale#pip) is not installed. Aborting."
|
||||
printf >&2 "%s\n" "Install it with 'pip install yamale'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v yamllint >/dev/null 2>&1 || {
|
||||
printf >&2 "%s\n" "yamllint (https://yamllint.readthedocs.io/en/stable/quickstart.html#installing-yamllint) is not installed. Aborting."
|
||||
printf >&2 "%s\n" "Install it with 'pip install yamllint'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v helm >/dev/null 2>&1 || {
|
||||
printf >&2 "%s\n" "helm (https://helm.sh/docs/intro/install) is not installed. Aborting."
|
||||
printf >&2 "%s\n" "Install it with 'curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v parallel >/dev/null 2>&1 || {
|
||||
printf >&2 "%s\n" "parallel (https://www.gnu.org/software/parallel) is not installed. Aborting."
|
||||
printf >&2 "%s\n" "Install it with 'sudo apt install parallel'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
changed=$(echo $charts | jq --raw-output '.[]')
|
||||
|
||||
echo "📂 Charts to lint:"
|
||||
|
||||
11
.github/workflows/charts-lint.yaml
vendored
11
.github/workflows/charts-lint.yaml
vendored
@@ -21,13 +21,13 @@ jobs:
|
||||
name: Lint Charts and Verify Dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout [master]
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: master
|
||||
|
||||
- name: Checkout
|
||||
- name: Checkout [commit]
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
@@ -35,14 +35,14 @@ jobs:
|
||||
|
||||
- name: Setting repo parent dir as safe safe.directory
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
|
||||
- name: Install go-yq
|
||||
run: |
|
||||
mkdir -p $HOME/.local/bin
|
||||
wget https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 -O $HOME/.local/bin/go-yq && \
|
||||
chmod +x $HOME/.local/bin/go-yq
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
|
||||
- name: Install pre-commit, yamale and yamllint
|
||||
run: |
|
||||
pip3 install --no-cache-dir pre-commit yamale yamllint
|
||||
@@ -71,9 +71,10 @@ jobs:
|
||||
if [[ $(echo ${OUTPUT_JSON} | jq --compact-output '. | length') -gt 0 ]]; then
|
||||
echo "detected=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
|
||||
- name: Test and Fix Pre-Commit Issues
|
||||
shell: bash
|
||||
# TODO: Only run pre-commit on changed files
|
||||
if: inputs.chartChangesDetected == 'true'
|
||||
run: |
|
||||
echo "Running pre-commit test-and-cleanup..."
|
||||
|
||||
75
.github/workflows/charts-test.yaml
vendored
75
.github/workflows/charts-test.yaml
vendored
@@ -14,7 +14,6 @@ on:
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
|
||||
generate-install-matrix:
|
||||
name: Generate matrix for install
|
||||
runs-on: ubuntu-latest
|
||||
@@ -55,7 +54,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ inputs.checkoutCommit }}
|
||||
|
||||
|
||||
- name: Install go-yq
|
||||
run: |
|
||||
mkdir -p $HOME/.local/bin
|
||||
@@ -79,29 +78,29 @@ jobs:
|
||||
OUTPUT_JSON4=$((echo $OUTPUT_JSON | jq -r -c '.[151:200]'; echo $OUTPUT_JSON | jq -r -c '.[451:500]'; echo $OUTPUT_JSON | jq -r -c '.[751:800]'; echo $OUTPUT_JSON | jq -r -c '.[1051:1100]'; echo $OUTPUT_JSON | jq -r -c '.[1351:1400]') | jq -s add)
|
||||
OUTPUT_JSON5=$((echo $OUTPUT_JSON | jq -r -c '.[201:250]'; echo $OUTPUT_JSON | jq -r -c '.[501:550]'; echo $OUTPUT_JSON | jq -r -c '.[801:850]'; echo $OUTPUT_JSON | jq -r -c '.[1101:1150]'; echo $OUTPUT_JSON | jq -r -c '.[1401:1450]') | jq -s add)
|
||||
OUTPUT_JSON6=$((echo $OUTPUT_JSON | jq -r -c '.[251:300]'; echo $OUTPUT_JSON | jq -r -c '.[551:600]'; echo $OUTPUT_JSON | jq -r -c '.[851:900]'; echo $OUTPUT_JSON | jq -r -c '.[1151:1200]'; echo $OUTPUT_JSON | jq -r -c '.[1451:1500]') | jq -s add)
|
||||
echo ::set-output name=charts1::${OUTPUT_JSON1}
|
||||
echo ::set-output name=charts2::${OUTPUT_JSON2}
|
||||
echo ::set-output name=charts3::${OUTPUT_JSON3}
|
||||
echo ::set-output name=charts4::${OUTPUT_JSON4}
|
||||
echo ::set-output name=charts5::${OUTPUT_JSON5}
|
||||
echo ::set-output name=charts6::${OUTPUT_JSON6}
|
||||
echo charts1=${OUTPUT_JSON1} >> $GITHUB_OUTPUT
|
||||
echo charts2=${OUTPUT_JSON2} >> $GITHUB_OUTPUT
|
||||
echo charts3=${OUTPUT_JSON3} >> $GITHUB_OUTPUT
|
||||
echo charts4=${OUTPUT_JSON4} >> $GITHUB_OUTPUT
|
||||
echo charts5=${OUTPUT_JSON5} >> $GITHUB_OUTPUT
|
||||
echo charts6=${OUTPUT_JSON6} >> $GITHUB_OUTPUT
|
||||
if [[ $(echo ${OUTPUT_JSON1} | jq -c '. | length') -gt 0 ]]; then
|
||||
echo "::set-output name=detected1::true"
|
||||
echo "detected1=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $(echo ${OUTPUT_JSON2} | jq -c '. | length') -gt 0 ]]; then
|
||||
echo "::set-output name=detected2::true"
|
||||
echo "detected2=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $(echo ${OUTPUT_JSON3} | jq -c '. | length') -gt 0 ]]; then
|
||||
echo "::set-output name=detected3::true"
|
||||
echo "detected3=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $(echo ${OUTPUT_JSON4} | jq -c '. | length') -gt 0 ]]; then
|
||||
echo "::set-output name=detected4::true"
|
||||
echo "detected4=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $(echo ${OUTPUT_JSON5} | jq -c '. | length') -gt 0 ]]; then
|
||||
echo "::set-output name=detected5::true"
|
||||
echo "detected5=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $(echo ${OUTPUT_JSON6} | jq -c '. | length') -gt 0 ]]; then
|
||||
echo "::set-output name=detected6::true"
|
||||
echo "detected6=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
install-charts1:
|
||||
@@ -126,11 +125,11 @@ jobs:
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "3.8.0"
|
||||
helm: "3.9.4"
|
||||
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
||||
@@ -171,11 +170,11 @@ jobs:
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "3.8.0"
|
||||
helm: "3.9.4"
|
||||
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
||||
@@ -217,11 +216,11 @@ jobs:
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "3.8.0"
|
||||
helm: "3.9.4"
|
||||
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
||||
@@ -262,11 +261,11 @@ jobs:
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "3.8.0"
|
||||
helm: "3.9.4"
|
||||
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
||||
@@ -307,11 +306,11 @@ jobs:
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "3.8.0"
|
||||
helm: "3.9.4"
|
||||
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
||||
@@ -352,11 +351,11 @@ jobs:
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "3.8.0"
|
||||
helm: "3.9.4"
|
||||
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
||||
@@ -399,43 +398,43 @@ jobs:
|
||||
res6="${{needs.install-charts6.result}}"
|
||||
|
||||
if [[ $res1 == "success" || $res1 == "skipped" ]]; then
|
||||
echo "install tests 1 successfull..."
|
||||
echo "Install test suite [1] was successful..."
|
||||
else
|
||||
echo "install tests 1 error, stopping due to failure..."
|
||||
echo "Install test suite [1] failed, stopping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $res2 == "success" || $res2 == "skipped" ]]; then
|
||||
echo "install tests 2 successfull..."
|
||||
echo "Install test suite [2] was successful..."
|
||||
else
|
||||
echo "install tests 2 error, stopping due to failure..."
|
||||
echo "Install test suite [2] failed, stopping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $res3 == "success" || $res3 == "skipped" ]]; then
|
||||
echo "install tests 3 successfull..."
|
||||
echo "Install test suite [3] was successful..."
|
||||
else
|
||||
echo "install tests 3 error, stopping due to failure..."
|
||||
echo "Install test suite [3] failed, stopping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $res4 == "success" || $res4 == "skipped" ]]; then
|
||||
echo "install tests 4 successfull..."
|
||||
echo "Install test suite [4] was successful..."
|
||||
else
|
||||
echo "install tests 4 error, stopping due to failure..."
|
||||
echo "Install test suite [4] failed, stopping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $res5 == "success" || $res5 == "skipped" ]]; then
|
||||
echo "install tests 5 successfull..."
|
||||
echo "Install test suite [5] was successful..."
|
||||
else
|
||||
echo "install tests 5 error, stopping due to failure..."
|
||||
echo "Install test suite [5] failed, stopping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $res6 == "success" || $res6 == "skipped" ]]; then
|
||||
echo "install tests 6 successfull..."
|
||||
echo "Install test suite [6] was successful..."
|
||||
else
|
||||
echo "install tests 6 error, stopping due to failure..."
|
||||
echo "Install test suite [6] failed, stopping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,7 @@ sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/stable/jackett
|
||||
- https://github.com/Jackett/Jackett
|
||||
type: application
|
||||
version: 14.0.28
|
||||
version: 14.0.29
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
|
||||
@@ -22,7 +22,7 @@ sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/stable/sonarr
|
||||
- https://github.com/Sonarr/Sonarr
|
||||
type: application
|
||||
version: 15.0.21
|
||||
version: 15.0.22
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
|
||||
Reference in New Issue
Block a user