-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add helm docs #4
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6b78435
add support for helm docs
76e0a7c
add test workflow
5950f9e
standard linting / static analaysis
7243e43
update yamllint
18fd441
remove actionlint
c2bde79
remove lint workflow
ebba4a3
comments
ef5a11d
seperate steps
40c5aa9
remove helm docs to start
2ff0ba4
use env
ae196aa
use env
a62586e
add helm docs back
0084dcc
use local path
3b41f51
revert to this
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Static analysis | ||
|
||
"on": | ||
pull_request: {} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
pre_commit_checks: | ||
name: pre-commit checks | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required to read from the repo | ||
contents: read | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install tool dependencies | ||
uses: jdx/mise-action@v2 | ||
|
||
- name: Run pre-commit | ||
run: | | ||
pre-commit run --show-diff-on-failure --color=always --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
sources: {} | ||
conditions: {} | ||
targets: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: Validate Changes to Workflow | ||
|
||
"on": | ||
pull_request: {} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
validate_changes: | ||
name: validate action changes | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required to read from the repo | ||
contents: read | ||
# required to read from the PR | ||
pull-requests: read | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: updatecli-minor-apply | ||
uses: prefecthq/actions-updatecli-apply@${{ github.head_ref }} | ||
with: | ||
manifest-path: .github/updatecli/manifest.yaml | ||
run-type: minor |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[tools] | ||
pre-commit = '3.8.0' | ||
shellcheck = '0.10.0' | ||
yamllint = '1.35.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
fail_fast: false | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: detect-private-key | ||
- id: no-commit-to-branch | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.28.0 | ||
hooks: | ||
- id: yamllint | ||
args: | ||
- --strict | ||
|
||
- repo: https://github.com/koalaman/shellcheck-precommit | ||
rev: v0.7.2 | ||
hooks: | ||
- id: shellcheck | ||
args: ["--severity=error"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
comments: | ||
min-spaces-from-content: 1 | ||
comments-indentation: disable | ||
line-length: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,83 @@ | ||
--- | ||
name: Run updatecli and push to git | ||
name: Run updatecli and open a PR with changes | ||
author: PrefectHQ | ||
description: This action will run updatecli and push the changes to git and will also open a PR | ||
inputs: | ||
manifest-path: | ||
description: "Path to the updatecli manifest file" | ||
description: Path to the updatecli manifest file | ||
default: ".github/updatecli/manifest-minor.yaml" | ||
required: true | ||
run-helm-docs: | ||
description: Run helm-docs | ||
default: "false" | ||
required: true | ||
run-type: | ||
description: "The type of updatecli run to perform (major or minor)" | ||
description: The type of updatecli run to perform (major or minor) | ||
default: "minor" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- id: configure_git | ||
- name: Configure git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
shell: bash | ||
|
||
- name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
run: | | ||
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Determine branch name | ||
run: | | ||
echo "BRANCH_NAME=dependency-version-${{ inputs.run-type }}-$DATE" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: create branch for dependency version updates | ||
run: git checkout -b "dependency-version-${{ inputs.run-type }}-${{ steps.date.outputs.date }}" | ||
- name: Create branch for dependency version updates | ||
run: | | ||
git checkout -b $BRANCH_NAME | ||
shell: bash | ||
|
||
- name: install updatecli in the runner | ||
- name: Install updatecli in the runner | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- name: run updatecli in apply mode | ||
id: updatecli_apply | ||
- name: Run updatecli in apply mode | ||
run: | | ||
updatecli apply --config ${{ inputs.manifest-path }} --experimental | ||
if [[ $(git diff --name-only | wc -l) -eq 0 ]]; then | ||
echo "No changes detected, exiting" | ||
echo "changes=false" >> $GITHUB_OUTPUT | ||
echo "CHANGES=false" >> $GITHUB_ENV | ||
exit 0 | ||
else | ||
echo "changes=true" >> $GITHUB_OUTPUT | ||
echo "CHANGES=true" >> $GITHUB_ENV | ||
fi | ||
git add . | ||
git commit -m "dependency-version-${{ inputs.run-type }}-${{ steps.date.outputs.date }}" | ||
git push --set-upstream origin "dependency-version-${{ inputs.run-type }}-${{ steps.date.outputs.date }}" | ||
git commit -m $BRANCH_NAME | ||
git push --set-upstream origin $BRANCH_NAME | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
shell: bash | ||
|
||
- name: create pr | ||
if: steps.updatecli_apply.outputs.changes == 'true' | ||
- name: Install `helm-docs` | ||
if: inputs.run-helm-docs == 'true' && env.CHANGES == 'true' | ||
uses: jdx/mise-action@v2 | ||
with: | ||
install_args: helm-docs | ||
|
||
- name: Run `helm-docs` | ||
if: inputs.run-helm-docs == 'true' && env.CHANGES == 'true' | ||
run: | | ||
git checkout "dependency-version-${{ inputs.run-type }}-${{ steps.date.outputs.date }}" | ||
gh pr create --base main --title "dependency-version-${{ inputs.run-type }}-bump-${{ steps.date.outputs.date }}" -f --label soc2 | ||
helm-docs --template-files=README.md.gotmpl | ||
git commit -am "helm-docs" | ||
git push | ||
shell: bash | ||
|
||
- name: Create PR | ||
if: env.CHANGES == 'true' | ||
run: | | ||
git checkout $BRANCH_NAME | ||
gh pr create --base main --title $BRANCH_NAME -f --label soc2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
GH_TOKEN: ${{ github.token }} | ||
shell: bash |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea if this will work -- will need to test on a subsequent pr