Skip to content

Update entrypoint.sh #20

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

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
set -euo pipefail

ret_code=0

install_dependencies(){
if [ "$RUNNER_OS" == "Linux" ]; then
if [[ "$RUNNER_OS" == "Linux" ]]; then
# https://github.com/pypa/setuptools/issues/3269
export DEB_PYTHON_INSTALL_LAYOUT=deb
fi
Expand All @@ -12,16 +13,13 @@ install_dependencies(){

run_commit_check(){
args=""
if [ "$MESSAGE" == "true" ]; then
if [[ "$MESSAGE" == "true" ]]; then
args="$args --message"
fi
if [ "$BRANCH" == "true" ]; then
elif [[ "$BRANCH" == "true" ]]; then
args="$args --branch"
fi
if [ "$AUTHOR_NAME" == "true" ]; then
elif [[ "$AUTHOR_NAME" == "true" ]]; then
args="$args --author-name"
fi
if [ "$AUTHOR_EMAIL" == "true" ]; then
elif [[ "$AUTHOR_EMAIL" == "true" ]]; then
args="$args --author-email"
fi

Expand All @@ -31,7 +29,7 @@ run_commit_check(){
}

add_job_summary(){
if [ "$JOB_SUMMARY" == "false" ]; then
if [[ "$JOB_SUMMARY" == "false" ]]; then
exit
fi

Expand All @@ -54,7 +52,7 @@ install_dependencies
run_commit_check
add_job_summary

if [ "$DRY_RUN" == "true" ]; then
if [[ "$DRY_RUN" == "true" ]]; then
ret_code=0
fi

Expand Down