ci: fix checkout by installing git first
Some checks failed
CI / Lint & Check (push) Failing after 10s
Some checks failed
CI / Lint & Check (push) Failing after 10s
This commit is contained in:
@@ -6,22 +6,29 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
name: Lint & Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: python:3.11-slim
|
image: python:3.11-slim
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Setup and checkout
|
||||||
run: |
|
run: |
|
||||||
|
apt-get update -qq && apt-get install -yqq --no-install-recommends git >/dev/null
|
||||||
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
||||||
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
|
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
|
||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: pip install --quiet ruff
|
run: pip install -q ruff
|
||||||
|
|
||||||
- name: Syntax check
|
- name: Syntax check
|
||||||
run: python -m py_compile harbor-ctl.py
|
run: python -m py_compile harbor-ctl.py
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: ruff check --select=E,F,W harbor-ctl.py
|
run: ruff check harbor-ctl.py
|
||||||
|
|||||||
Reference in New Issue
Block a user