Skip to content

Commit 63a8228

Browse files
committed
Update tox-lint action for gitea compatibility
1 parent 760af9f commit 63a8228

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/tox-lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,24 @@ jobs:
4242
sudo apt-get update -q
4343
sudo apt-get install -qy libcap-dev
4444
45+
# actions/checkout needs Node.js which isn't available in the
46+
# buster container on Gitea runners — use a plain git clone there
4547
- name: Checkout repository
48+
if: matrix.python-version != '2.7'
4649
uses: actions/checkout@v4
4750

51+
- name: Checkout repository (container)
52+
if: matrix.python-version == '2.7'
53+
env:
54+
TOKEN: ${{ github.token }}
55+
run: |
56+
git config --global --add safe.directory "$PWD"
57+
git init
58+
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
59+
git -c "http.extraHeader=Authorization: token ${TOKEN}" \
60+
fetch --depth 1 origin "${GITHUB_SHA}"
61+
git checkout FETCH_HEAD
62+
4863
# ── Python 3 ───────────────────────────────────────────────
4964
- name: Set up Python ${{ matrix.python-version }}
5065
if: matrix.python-version != '2.7'

0 commit comments

Comments
 (0)