Needs git and gh.
Add to .bashrc
github() {
[[ "$1" != "init" ]] && return
parent=$(builtin cd "$PWD/.." && pwd)
if [[ "$parent" == "/home/richeney" || "$parent" == "/git" ]]
then
git init
gh repo create $(basename $PWD) --public --source=.
else
echo "Parent directory is neither /home/richeney nor /git"
fi
}
Example:
mkdir multitenanted_aks && cd multitenanted_aks
git init
Initialized empty Git repository in /git/multitenanted_aks/.git/
echo "# Multi-tenanted AKS with workload identities" > README.md
git add --all
git commit -a -m "Initial commit"
[main (root-commit) c0864ce] Initial commit
1 file changed, 1 insertion(+)
create mode 100644 README.md
gh repo create
And follow the prompts. Or:
gh repo create $(basename $PWD) --public --source=. --add-readme
code ,