以下の内容はhttps://htn20190109.hatenablog.com/entry/2024/07/02/003515より取得しました。


GitHub CLI コマンド

 

 

-- 認証

gh auth login
gh auth status
gh auth logout

gh auth token

 


-- リポジトリ

cd
rm -rf repo01 repo02

gh repo list
gh repo create repo01 --public --clone --add-readme
gh repo create repo02 --private --clone --add-readme
gh repo list

cd repo01


-- 別ブランチを作成してプッシュ、プルリクエスト作成、マージ

git switch -c branch01 main

echo test > test.txt
echo date > test.sh

git add .
git commit -m $(date "+%Y%m%d_%H%M%S") --allow-empty
git push origin branch01

gh pr create --fill-first --label "enhancement"
gh pr list
gh pr merge --merge
gh pr list

 


-- シェルの実行権限付与
※ git特有の権限、chmod +x でうまくいかない場合実施

git ls-files -s
git update-index --add --chmod=+x test.sh
git ls-files -s

 

-- ワークフロー

mkdir -p .github/workflows

cat <<-'EOF' > .github/workflows/wf01.yml
name: wf01
on: [push, pull_request,workflow_dispatch]
jobs:
  job01:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Hello,World"
EOF

git add .
git commit -m $(date "+%Y%m%d_%H%M%S") --allow-empty
git push origin branch01

gh pr create --fill-first --label "enhancement"
gh pr list
gh pr merge --merge
gh pr list

 

gh workflow list
gh run list --workflow=wf01.yml

gh workflow run wf01.yml 

gh run list --workflow=wf01.yml

 


-- variable

gh variable list
gh variable set KEY01 --body 'value01'
gh variable list


-- secret

gh secret list
gh secret set KEY02 --body 'value02'
gh secret list

 

-- リリース

gh release list
gh release create v0.2.0 --title "v0.2.0" --generate-notes
gh release list

 

 




以上の内容はhttps://htn20190109.hatenablog.com/entry/2024/07/02/003515より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14