-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support to generate outputs and update README.adoc
- Loading branch information
Showing
5 changed files
with
188 additions
and
49 deletions.
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
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
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,24 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Add the "--dry-run" flag if the dry-run argument is "true" | ||
# Add the "--dry-run" flag if the dry-run argument is "true". | ||
dry_run=$( [ $1 == "true" ] && echo "--dry-run" || echo "" ) | ||
|
||
# Run the Python script | ||
python3 /helm_dependency_bumper.py $dry_run --chart $2 --upgrade-strategy $3 --exclude-dependency $4 | ||
# Add the "--update-readme" flag if the update-readme argument is not empty. | ||
update_readme=$( [ $2 != "" ] && echo "--update-readme $2" || echo "" ) | ||
|
||
# Exit with error code if the Python script fails | ||
# Run the Python script. | ||
python3 /helm_dependency_bumper.py $dry_run \ | ||
$update_readme \ | ||
--chart $3 \ | ||
--upgrade-strategy $4 \ | ||
--exclude-dependency $5 \ | ||
--output output.txt | ||
|
||
# Exit with error code if the Python script fails. | ||
if [ $(echo $?) == 1 ]; then | ||
exit 1 | ||
fi | ||
|
||
# Remove the manifest so it is not committed to the repository | ||
rm manifest.yaml | ||
|
||
# Set up the workspace directory as a safe directory for Git otherwise the git command will fail | ||
git config --global --add safe.directory /github/workspace | ||
|
||
# Return a boolean indicating whether the any dependency was upgraded | ||
upgraded=$( [[ `git status --porcelain` ]] && echo true || echo false ) | ||
echo "chart-upgraded=$upgraded" >> $GITHUB_OUTPUT | ||
# Return the booleans indicating whether any dependency was upgraded or if there was a major upgrade. | ||
echo $(cat output.txt) >> $GITHUB_OUTPUT | ||
rm output.txt | ||
|
||
exit 0 |
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