fix: haskelseed-native Gitea Actions without GitHub marketplace
Some checks failed
ci / test (push) Failing after 6s
Some checks failed
ci / test (push) Failing after 6s
Replace actions/checkout and setup-python with internal git clone and system python3. Drops CI matrix to a single job on the self-hosted runner.
This commit is contained in:
@@ -9,26 +9,28 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: haskelseed
|
runs-on: haskelseed
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.10", "3.12"]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out source
|
- name: Check out source
|
||||||
uses: actions/checkout@v4
|
env:
|
||||||
|
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
run: |
|
||||||
uses: actions/setup-python@v5
|
git clone --depth 1 \
|
||||||
with:
|
"https://tegwick:${PACKAGE_TOKEN}@gitea.coulomb.social/coulomb/kaizen-agentic.git" \
|
||||||
python-version: ${{ matrix.python-version }}
|
repo
|
||||||
|
cd repo
|
||||||
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
- name: Install package and dev tools
|
- name: Install package and dev tools
|
||||||
run: python -m pip install --upgrade pip && python -m pip install -e ".[dev]"
|
run: |
|
||||||
|
cd repo
|
||||||
|
python3 -m pip install --upgrade pip
|
||||||
|
python3 -m pip install -e ".[dev]"
|
||||||
|
|
||||||
- name: Format check (black)
|
- name: Format check (black)
|
||||||
run: black --check src tests
|
run: cd repo && black --check src tests
|
||||||
|
|
||||||
- name: Lint (flake8)
|
- name: Lint (flake8)
|
||||||
run: pip install flake8 && flake8 src/ --max-line-length=100
|
run: cd repo && flake8 src/ --max-line-length=100
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest tests/ -q --ignore=tests/test_cli_error_handling.py
|
run: cd repo && pytest tests/ -q --ignore=tests/test_cli_error_handling.py
|
||||||
|
|||||||
@@ -11,27 +11,24 @@ jobs:
|
|||||||
runs-on: haskelseed
|
runs-on: haskelseed
|
||||||
steps:
|
steps:
|
||||||
- name: Check out source
|
- name: Check out source
|
||||||
uses: actions/checkout@v4
|
env:
|
||||||
|
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 \
|
||||||
|
"https://tegwick:${PACKAGE_TOKEN}@gitea.coulomb.social/coulomb/kaizen-agentic.git" \
|
||||||
|
repo
|
||||||
|
cd repo
|
||||||
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Build and publish
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
|
|
||||||
- name: Install packaging tools
|
|
||||||
run: python -m pip install --upgrade build twine
|
|
||||||
|
|
||||||
- name: Build distributions
|
|
||||||
run: python -m build
|
|
||||||
|
|
||||||
- name: Validate distributions
|
|
||||||
run: python -m twine check dist/*
|
|
||||||
|
|
||||||
- name: Upload to Gitea PyPI
|
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: ${{ secrets.PACKAGE_USER }}
|
TWINE_USERNAME: ${{ secrets.PACKAGE_USER }}
|
||||||
TWINE_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
run: >-
|
run: |
|
||||||
python -m twine upload
|
cd repo
|
||||||
--repository-url https://gitea.coulomb.social/api/packages/coulomb/pypi
|
python3 -m pip install --upgrade pip build twine
|
||||||
dist/*
|
python3 -m build
|
||||||
|
python3 -m twine check dist/*
|
||||||
|
python3 -m twine upload \
|
||||||
|
--repository-url https://gitea.coulomb.social/api/packages/coulomb/pypi \
|
||||||
|
dist/*
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ Configure in Gitea: **Repository → Settings → Actions → Secrets**.
|
|||||||
| `PACKAGE_TOKEN` | Gitea API token with `write:package` scope |
|
| `PACKAGE_TOKEN` | Gitea API token with `write:package` scope |
|
||||||
|
|
||||||
Gitea rejects secret names prefixed with `GITEA_` — use `PACKAGE_USER` / `PACKAGE_TOKEN`
|
Gitea rejects secret names prefixed with `GITEA_` — use `PACKAGE_USER` / `PACKAGE_TOKEN`
|
||||||
(not `GITEA_PACKAGE_USER`).
|
(not `GITEA_PACKAGE_USER`). Workflows use `runs-on: haskelseed` and native `git clone`
|
||||||
|
(no GitHub Marketplace actions).
|
||||||
|
|
||||||
The publish workflow fails at the upload step when either secret is missing or
|
The publish workflow fails at the upload step when either secret is missing or
|
||||||
invalid. Do not commit tokens to the repository.
|
invalid. Do not commit tokens to the repository.
|
||||||
|
|||||||
Reference in New Issue
Block a user