Skip to content

Commit

Permalink
fixup! Extract PR validation from chart-verifier job
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 21, 2024
1 parent 6a88a5d commit 567a3e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Upload PR information
uses: actions/upload-artifact@v4
if: ${{ always() }}
if: ${{ always() && steps.validate-submission.outputs.submission_file_present == 'true' }}
with:
name: submission
path: ${{ env.SUBMISSION_PATH }}
Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:
message_file: ${{ steps.pr_comment.outputs.message-file }}
message_text_base64: ${{ steps.encode_pr_comment.outputs.message-text-base64 }}

# Run manage-gh-pr as long as setup was successfull, independently from potential errors in validate-submission or chart-verifier
# Run manage-gh-pr as long as setup was successful, independently from potential errors in validate-submission or chart-verifier
if: ${{ always() && needs.setup.result == 'success' }}

steps:
Expand Down
4 changes: 2 additions & 2 deletions scripts/src/submission/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def parse_modified_files(self):
self.set_tarball(file_path, match)
elif file_category == "owners":
self.modified_owners.append(file_path)
elif file_category == "unknwown":
elif file_category == "unknown":
self.modified_unknown.append(file_path)

def set_report(self, file_path: str):
Expand Down Expand Up @@ -573,7 +573,7 @@ def get_file_type(file_path: str) -> tuple[str, re.Match[str]]:
if owners_match:
return "owners", owners_match

return "unknwown", None
return "unknown", None


def download_index_data(
Expand Down
2 changes: 2 additions & 0 deletions scripts/src/submission/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def main():
except ParseFilesError as e:
# Save submission and exit early in case of an error during parsing of the modified files
write_submission_to_file(s, args.output)
gitutils.add_output("submission_file_present", "true")
print(str(e))
gitutils.add_output("pr-content-error-message", str(e))
sys.exit(10)
Expand All @@ -166,6 +167,7 @@ def main():
gitutils.add_output("vendor_type", s.chart.get_vendor_type())

write_submission_to_file(s, args.output)
gitutils.add_output("submission_file_present", "true")

if owners_error_msg or pr_content_error_msg:
print(
Expand Down

0 comments on commit 567a3e9

Please sign in to comment.