Github Action

Run Python on Github …

前言 記下 Github Action 執行 Python 程式 Example name: run script.py on: issue: - labeled jobs: build: runs-on: ubuntu-latest steps: - name: checkout repo content uses: actions/checkout@v2 - name: setup python uses: actions/setup-python@v4 with: python-version: '3.10' - name: install python packages …

[Note] Merge error in …

前言 使用 Github Action 來執行 git merge 指令時,出現如下錯誤: fatal: refusing to merge unrelated histories Solution 原因出在 actions/checkout@v2 的 fetch-depth v2 的 fetch-depth 預設為 1 需要設為 0 或將 --unshallow 新增至 fetch 指令 git fetch --unshallow My Github Action name: Merge branch on: issues: types: - closed jobs: …