From 6ec974358be1166c249f8eac2017323c84310d03 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:38:24 -0400 Subject: [PATCH] Switch to cronjob batch/v1 (#10) * Switch to cronjob batch/v1 https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125 * Use kubeconform instead of kubeval --- .github/actions/spelling-data/advice.md | 4 - .../actions/spelling-data/candidate.patterns | 201 ++++++++++++++---- .github/actions/spelling-data/excludes.txt | 6 + .github/actions/spelling-data/expect.txt | 6 +- .../spelling-data/line_forbidden.patterns | 159 +++++++++++--- .github/actions/spelling-data/patterns.txt | 20 +- .github/kubeval.sh | 4 - .github/validate-kube.sh | 4 + .github/workflows/helm-test.yaml | 39 ++-- .github/workflows/spelling.yml | 42 ++-- charts/scala-steward/Chart.yaml | 2 +- charts/scala-steward/templates/cron-job.yaml | 2 +- 12 files changed, 367 insertions(+), 122 deletions(-) delete mode 100755 .github/kubeval.sh create mode 100755 .github/validate-kube.sh diff --git a/.github/actions/spelling-data/advice.md b/.github/actions/spelling-data/advice.md index a32d109..84eb921 100644 --- a/.github/actions/spelling-data/advice.md +++ b/.github/actions/spelling-data/advice.md @@ -25,7 +25,3 @@ https://www.regexplanet.com/advanced/perl/) yours before committing to verify it Note that patterns can't match multiline strings. - - -:steam_locomotive: If you're seeing this message and your PR is from a branch that doesn't have check-spelling, -please merge to your PR's base branch to get the version configured for your repository. diff --git a/.github/actions/spelling-data/candidate.patterns b/.github/actions/spelling-data/candidate.patterns index 3bc400a..4be190c 100644 --- a/.github/actions/spelling-data/candidate.patterns +++ b/.github/actions/spelling-data/candidate.patterns @@ -8,12 +8,15 @@ ^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b # patch hunk comments -^\@\@ -\d+(?:,\d+|) \+\d+(?:,\d+|) \@\@ .* +^@@ -\d+(?:,\d+|) \+\d+(?:,\d+|) @@ .* # git index header index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40} +# file permissions +['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s] + # css url wrappings -\burl\([^)]*\) +\burl\([^)]+\) # cid urls (['"])cid:.*?\g{-1} @@ -23,13 +26,13 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40} # data url in quotes ([`'"])data:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1} # data url -data:[-a-zA-Z=;:/0-9+]*,\S* +\bdata:[-a-zA-Z=;:/0-9+]*,\S* # https/http/file urls (?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|] # mailto urls -mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,} +mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,} # magnet urls magnet:[?=:\w]+ @@ -130,6 +133,8 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. (?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|) # GitHub SHAs \bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b +# GitHub SHA refs +\[([0-9a-f]+)\]\(https://(?:www\.|)github.com/[-\w]+/[-\w]+/commit/\g{-1}[0-9a-f]* # GitHub wiki \bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b # githubusercontent @@ -141,12 +146,15 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. # git.io \bgit\.io/[0-9a-zA-Z]+ # GitHub JSON -"node_id": "[-a-zA-Z=;:/0-9+]*" +"node_id": "[-a-zA-Z=;:/0-9+_]*" # Contributor -\[[^\]]+\]\(https://github\.com/[^/\s"]+\) +\[[^\]]+\]\(https://github\.com/[^/\s"]+/?\) # GHSA GHSA(?:-[0-9a-z]{4}){3} +# GitHub actions +\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+ + # GitLab commit \bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b # GitLab merge requests @@ -156,7 +164,7 @@ GHSA(?:-[0-9a-z]{4}){3} # GitLab commits \bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b -# binanace +# binance accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]* # bitbucket diff @@ -205,7 +213,7 @@ accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]* # medium link \blink\.medium\.com/[a-zA-Z0-9]+ # medium -\bmedium\.com/\@?[^/\s"]+/[-\w]+ +\bmedium\.com/@?[^/\s"]+/[-\w]+ # microsoft \b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]* @@ -270,7 +278,7 @@ slack://[a-zA-Z0-9?&=]+ [0-9a-f]{32}\@o\d+\.ingest\.sentry\.io\b # Twitter markdown -\[\@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\) +\[@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\) # Twitter hashtag \btwitter\.com/hashtag/[\w?_=&]* # Twitter status @@ -325,7 +333,7 @@ ipfs://[0-9a-zA-Z]{3,} [^"\s]+/gitweb/\S+;h=[0-9a-f]+ # HyperKitty lists -/archives/list/[^@/]+\@[^/\s"]*/message/[^/\s"]*/ +/archives/list/[^@/]+@[^/\s"]*/message/[^/\s"]*/ # lists /thread\.html/[^"\s]+ @@ -343,7 +351,7 @@ ipfs://[0-9a-zA-Z]{3,} \bopen\.spotify\.com/embed/playlist/\w+ # Mastodon -\bmastodon\.[-a-z.]*/(?:media/|\@)[?&=0-9a-zA-Z_]* +\bmastodon\.[-a-z.]*/(?:media/|@)[?&=0-9a-zA-Z_]* # scastie \bscastie\.scala-lang\.org/[^/]+/\w+ @@ -385,7 +393,9 @@ ipfs://[0-9a-zA-Z]{3,} (?:\\(?:u00|x)1[Bb]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+|)m # URL escaped characters -\%[0-9A-F][A-F] +%[0-9A-F][A-F](?=[A-Za-z]) +# lower URL escaped characters +%[0-9a-f][a-f](?=[a-z]{2,}) # IPv6 \b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b # c99 hex digits (not the full format, just one I've seen) @@ -410,12 +420,15 @@ sha\d+:[0-9]*[a-f]{3,}[0-9a-f]* # Well known gpg keys .well-known/openpgpkey/[\w./]+ +# pki +-----BEGIN.*-----END + # uuid: \b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b # hex digits including css/html color classes: -(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b +(?:[\\0][xX]|\\u|[uU]\+|#x?|%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b # integrity -integrity=(['"])sha\d+-[-a-zA-Z=;:/0-9+]{40,}\g{-1} +integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1} # https://www.gnu.org/software/groff/manual/groff.html # man troff content @@ -430,8 +443,8 @@ integrity=(['"])sha\d+-[-a-zA-Z=;:/0-9+]{40,}\g{-1} # Localized .desktop content Name\[[^\]]+\]=.* -# IServiceProvider -\bI(?=(?:[A-Z][a-z]{2,})+\b) +# IServiceProvider / isAThing +(?:\b|_)(?:I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z]|\b)) # crypt (['"])\$2[ayb]\$.{56}\g{-1} @@ -439,42 +452,84 @@ Name\[[^\]]+\]=.* # scrypt / argon \$(?:scrypt|argon\d+[di]*)\$\S+ +# go.sum +\bh1:\S+ + +# scala imports +^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+ + +# scala modules +("[^"]+"\s*%%?\s*){2,3}"[^"]+" + +# Intel intrinsics +_mm_\w+ + # Input to GitHub JSON content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1} +# This does not cover multiline strings, if your repository has them, +# you'll want to remove the `(?=.*?")` suffix. +# The `(?=.*?")` suffix should limit the false positives rate # printf -%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA]|p)(?=[a-zA-Z]{2,})) +%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA]|p)(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"]) -# Python stringprefix / binaryprefix +# Alternative printf +# %s +%(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"]) + +# Python string prefix / binary prefix # Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings -(?|m([|!/@#,;']).*?\g{-1}) + +# perl qr regex +(?|\(.*?\)|([|!/@#,;']).*?\g{-1}) + +# perl run +perl(?:\s+-[a-zA-Z]\w*)+ + +# C network byte conversions +(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\() # Go regular expressions regexp?\.MustCompile\(`[^`]*`\) +# regex choice +\(\?:[^)]+\|[^)]+\) + +# proto +^\s*(\w+)\s\g{-1} = + # sed regular expressions sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2} +# node packages +(["'])@[^/'" ]+/[^/'" ]+\g{-1} + # go install go install(?:\s+[a-z]+\.[-@\w/.]+)+ +# jetbrains schema https://youtrack.jetbrains.com/issue/RSRP-489571 +urn:shemas-jetbrains-com + # kubernetes pod status lists # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase \w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+ @@ -486,7 +541,7 @@ go install(?:\s+[a-z]+\.[-@\w/.]+)+ -[0-9a-f]{10}-\w{5}\s # posthog secrets -posthog\.init\((['"])phc_[^"',]+\g{-1}, +([`'"])phc_[^"',]+\g{-1} # xcode @@ -496,36 +551,70 @@ posthog\.init\((['"])phc_[^"',]+\g{-1}, # xcode api botches customObjectInstantitationMethod +# msvc api botches +PrependWithABINamepsace + +# configure flags +.* \| --\w{2,}.*?(?=\w+\s\w+) + # font awesome classes \.fa-[-a-z0-9]+ +# bearer auth +(['"])[Bb]ear[e][r] .*?\g{-1} + +# bearer auth +\b[Bb]ear[e][r]:? [-a-zA-Z=;:/0-9+.]+ + # basic auth -(['"])Basic [-a-zA-Z=;:/0-9+]{3,}\g{-1} +(['"])[Bb]asic [-a-zA-Z=;:/0-9+]{3,}\g{-1} # base64 encoded content -(['"])[-a-zA-Z=;:/0-9+]+=\g{-1} +([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1} +# base64 encoded content in xml/sgml +>[-a-zA-Z=;:/0-9+]{3,}== 0.0.22) +\\\w{2,}\{ + +# American Mathematical Society (AMS) / Doxygen +TeX/AMS + +# File extensions +\*\.[+\w]+, # eslint "varsIgnorePattern": ".+" @@ -533,13 +622,21 @@ customObjectInstantitationMethod # Windows short paths [/\\][^/\\]{5,6}~\d{1,2}[/\\] -# in a version of check-spelling after @0.0.21 printf markers won't be automatically consumed +# cygwin paths +/cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+ + +# in check-spelling@v0.0.22+, printf markers aren't automatically consumed # printf markers (?v# (?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) -# Compiler flags (Scala) -(?:^|[\t ,>"'`=(])-J-[DPWXY](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) -# Compiler flags -(?:^|[\t ,>"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) + +# Compiler flags (Unix, Java/Scala) +# Use if you have things like `-Pdocker` and want to treat them as `docker` +(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) + +# Compiler flags (Windows / PowerShell) +# This is a subset of the more general compiler flags pattern. +# It avoids matching `-Path` to prevent it from being treated as `ath` +(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})) + # Compiler flags (linker) ,-B + +# libraries +\blib(?!rar(?:ies|y))(?=[a-z]) + +# WWNN/WWPN (NAA identifiers) +\b(?:0x)?10[0-9a-f]{14}\b|\b(?:0x|3)?[25][0-9a-f]{15}\b|\b(?:0x|3)?6[0-9a-f]{31}\b + +# iSCSI iqn (approximate regex) +\biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b + # curl arguments -\b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)* +\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)* # set arguments -\bset(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)* +\b(?:bash|sh|set)(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)* # tar arguments \b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+ # tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long... \btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b # macOS temp folders /var/folders/\w\w/[+\w]+/(?:T|-Caches-)/ +# github runner temp folders +/home/runner/work/_temp/[-_/a-z0-9]+ diff --git a/.github/actions/spelling-data/excludes.txt b/.github/actions/spelling-data/excludes.txt index a5b2388..ee00301 100644 --- a/.github/actions/spelling-data/excludes.txt +++ b/.github/actions/spelling-data/excludes.txt @@ -18,6 +18,7 @@ ignore$ \.cer$ \.class$ \.coveragerc$ +\.crl$ \.crt$ \.csr$ \.dll$ @@ -25,6 +26,7 @@ ignore$ \.drawio$ \.DS_Store$ \.eot$ +\.eps$ \.exe$ \.gif$ \.git-blame-ignore-revs$ @@ -60,17 +62,21 @@ ignore$ \.pylintrc$ \.qm$ \.s$ +\.sig$ \.so$ \.svgz?$ \.sys$ \.tar$ +\.tgz$ \.tiff?$ \.ttf$ \.wav$ \.webm$ \.webp$ \.woff2?$ +\.xcf$ \.xlsx?$ +\.xpm$ \.xz$ \.zip$ /values\.yaml$ diff --git a/.github/actions/spelling-data/expect.txt b/.github/actions/spelling-data/expect.txt index 294b00b..022c7f5 100644 --- a/.github/actions/spelling-data/expect.txt +++ b/.github/actions/spelling-data/expect.txt @@ -1,18 +1,16 @@ configmap fullname garnercorp +GOPATH kube -kubectl +kubeconform kubernetes -kubeval nindent noreply opensource -plugins pvc sbt scalafix -stefanprodan tpl trunc unshallow diff --git a/.github/actions/spelling-data/line_forbidden.patterns b/.github/actions/spelling-data/line_forbidden.patterns index 9fbf8c8..886e637 100644 --- a/.github/actions/spelling-data/line_forbidden.patterns +++ b/.github/actions/spelling-data/line_forbidden.patterns @@ -1,78 +1,181 @@ # reject `m_data` as VxWorks defined it and that breaks things if it's used elsewhere # see [fprime](https://github.com/nasa/fprime/commit/d589f0a25c59ea9a800d851ea84c2f5df02fb529) # and [Qt](https://github.com/qtproject/qt-solutions/blame/fb7bc42bfcc578ff3fa3b9ca21a41e96eb37c1c7/qtscriptclassic/src/qscriptbuffer_p.h#L46) -# \bm_data\b +#\bm_data\b +# Were you debugging using a framework with `fit()`? # If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test, -# you might not want to check in code where you were debugging w/ `fit()`, in which case, you might want -# to use this: +# you might not want to check in code where you skip all the other tests. #\bfit\( -# s.b. GitHub -\bGithub\b +# Should be `HH:MM:SS` +\bHH:SS:MM\b -# s.b. GitLab -\bGitlab\b +# Should be `86400` (seconds in a standard day) +\b84600\b(?:.*\bday\b) -# s.b. JavaScript +# Should probably be `2006-01-02` (yyyy-mm-dd) +\b2006-01-02\b + +# Should probably be `YYYYMMDD` +\b[Yy]{4}[Dd]{2}[Mm]{2}(?!.*[Yy]{4}[Dd]{2}[Mm]{2}).*$ + +# Should be `anymore` +\bany more[,.] + +# Should be `cannot` (or `can't`) +# See https://www.grammarly.com/blog/cannot-or-can-not/ +# > Don't use `can not` when you mean `cannot`. The only time you're likely to see `can not` written as separate words is when the word `can` happens to precede some other phrase that happens to start with `not`. +# > `Can't` is a contraction of `cannot`, and it's best suited for informal writing. +# > In formal writing and where contractions are frowned upon, use `cannot`. +# > It is possible to write `can not`, but you generally find it only as part of some other construction, such as `not only . . . but also.` +# - if you encounter such a case, add a pattern for that case to patterns.txt. +\b[Cc]an not\b + +# Should be `GitHub` +(?v# (?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) +# hit-count: 1 file-count: 1 +# go install +go install(?:\s+[a-z]+\.[-@\w/.]+)+ + # Questionably acceptable forms of `in to` # Personally, I prefer `log into`, but people object # https://www.tprteaching.com/log-into-log-in-to-login/ -\b[Ll]og in to\b +\b(?:[Ll]og|[Ss]ign) in to\b + +# to opt in +\bto opt in\b # acceptable duplicates # ls directory listings -[-bcdlpsw](?:[-r][-w][-Ssx]){3}\s+\d+\s+\S+\s+\S+\s+\d+\s+ +[-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+\d+\s+ # mount \bmount\s+-t\s+(\w+)\s+\g{-1}\b # C types and repeated CSS values -\s(center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s +\s(auto|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s # C struct \bstruct\s+(\w+)\s+\g{-1}\b # go templates \s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml): -# javadoc / .net -(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s +# doxygen / javadoc / .net +(?:[\\@](?:brief|groupname|link|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+(?:static|override|readonly|required|virtual))*)(?:\s+\{\w+\}|)\s+(\w+)\s+\g{-1}\s + +# Python package registry has incorrect spelling for macOS / Mac OS X +"Operating System :: MacOS :: MacOS X" # Commit message -- Signed-off-by and friends ^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$ diff --git a/.github/kubeval.sh b/.github/kubeval.sh deleted file mode 100755 index 4f9312e..0000000 --- a/.github/kubeval.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -e -for f in charts/*; do - helmv3 template "$f" | kubeval --strict -done diff --git a/.github/validate-kube.sh b/.github/validate-kube.sh new file mode 100755 index 0000000..0c807f9 --- /dev/null +++ b/.github/validate-kube.sh @@ -0,0 +1,4 @@ +#!/bin/sh -e +for f in charts/*; do + helm template "$f" | kubeconform --strict +done diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index 86fa42d..ad53c89 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -7,21 +7,36 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch history run: git fetch --prune --unshallow - name: Run chart-testing (lint) id: lint - uses: helm/chart-testing-action@v1.0.0-rc.1 - with: - command: lint - - - name: Run kubeval - uses: stefanprodan/kube-tools@v1 - with: - kubectl: 1.18.2 - helmv3: 3.2.1 - command: | - ./.github/kubeval.sh + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (list-changed) + id: list-changed + env: + default_branch: ${{ github.event.repository.default_branch }} + run: | + changed=$(ct list-changed --target-branch "$default_branch") + if [ -n "$changed" ]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + env: + default_branch: ${{ github.event.repository.default_branch }} + run: ct lint --target-branch "$default_branch" + + - name: Download kubeconform + run: | + go install github.com/yannh/kubeconform/cmd/kubeconform@latest + echo $(go env GOPATH)/bin >> "$GITHUB_PATH" + + - name: Validate kubernetes objects + run: | + ./.github/validate-kube.sh diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 68b1ba8..aa7b777 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -59,16 +59,16 @@ name: Spell checking on: push: branches: - - "**" + - "**" tags-ignore: - - "**" + - "**" pull_request: branches: - - "**" + - "**" types: - - 'opened' - - 'reopened' - - 'synchronize' + - 'opened' + - 'reopened' + - 'synchronize' jobs: spelling: @@ -87,17 +87,19 @@ jobs: # note: If you use only_check_changed_files, you do not want cancel-in-progress cancel-in-progress: true steps: - - name: check-spelling - id: spelling - uses: check-spelling/check-spelling@v0.0.21 - with: - config: .github/actions/spelling-data - suppress_push_for_open_pull_request: 1 - checkout: true - check_file_names: 1 - post_comment: 0 - use_magic_file: 1 - use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} - check_extra_dictionaries: '' - extra_dictionaries: - cspell:software-terms/src/software-terms.txt + - name: check-spelling + id: spelling + uses: check-spelling/check-spelling@v0.0.22 + with: + config: .github/actions/spelling-data + suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} + checkout: true + check_file_names: 1 + post_comment: 0 + use_magic_file: 1 + report-timing: 1 + warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end + use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} + check_extra_dictionaries: '' + extra_dictionaries: | + cspell:software-terms/dict/softwareTerms.txt diff --git a/charts/scala-steward/Chart.yaml b/charts/scala-steward/Chart.yaml index 034bbbf..1013889 100644 --- a/charts/scala-steward/Chart.yaml +++ b/charts/scala-steward/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: scala-steward type: application -version: 0.2.2 +version: 0.2.3 appVersion: 0.5.0 description: A Helm chart for scala-steward keywords: diff --git a/charts/scala-steward/templates/cron-job.yaml b/charts/scala-steward/templates/cron-job.yaml index ed2147a..6ebed8a 100644 --- a/charts/scala-steward/templates/cron-job.yaml +++ b/charts/scala-steward/templates/cron-job.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: {{ include "scala-steward.fullname" . }}