-
-
Save KyMidd/570eb6dda47a86eda9924ef59489e0c7 to your computer and use it in GitHub Desktop.
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
# Create workflows directory if not exist, copy source over existing | |
mkdir -p .github/workflows | |
cp ../../actions-runner/_work/$automation_repo/$automation_repo/commit_checker/github_commit_checker.yml.template .github/workflows/_GitCommitChecker.yml | |
# Checkout new branch | |
git checkout -b $branch | |
# Add file, commit | |
git add . | |
git commit -m $commit_message | |
# Identify base/main branch | |
if [[ "$initRepo" == "true" ]]; then | |
base_branch=master | |
else | |
base_branch=$(git symbolic-ref refs/remotes/origin/HEAD | cut -d "/" -f 4) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment