-
-
Save KyMidd/80bd9fbb27e2d11ce61fd836768a490e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# If we've made any changes, create branch, add files, push | |
if [ $MADE_CHANGE = true ]; then | |
# Checkout local branch | |
git checkout -b feature/${COLLECTION_MIGRATION_TICKET}-Create-GitHubActions-and-CODEOWNERS | |
# Add files to git | |
git add .github/workflows/_PfGitCommitChecker.yml &>/dev/null | |
git add .github/workflows/ActionPRValidate_AnyJobRun.yaml &>/dev/null | |
git add .github/workflows/MergeCommitNotify.yml &>/dev/null | |
git add CODEOWNERS &>/dev/null | |
# Commit changes | |
COMMIT=$(git commit -m "${COLLECTION_MIGRATION_TICKET} Create GitHub Actions and CODEOWNERS") | |
if [[ $(echo "$COMMIT" | grep 'nothing to commit' | wc -l | awk 'NF') -eq 1 ]] ; then | |
echo "No changes, nothing to commit" | |
else | |
# Changes detected, print commit info and do PR | |
echo "$COMMIT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment