Compare commits
No commits in common. "main" and "v0.1.0" have entirely different histories.
50
.github/workflows/python_publish.yml
vendored
50
.github/workflows/python_publish.yml
vendored
@ -55,7 +55,7 @@ jobs:
|
|||||||
name: python-package-distributions
|
name: python-package-distributions
|
||||||
path: dist/
|
path: dist/
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|
||||||
@ -106,31 +106,31 @@ jobs:
|
|||||||
# '${{ github.ref_name }}' dist/**
|
# '${{ github.ref_name }}' dist/**
|
||||||
# --repo '${{ github.repository }}'
|
# --repo '${{ github.repository }}'
|
||||||
|
|
||||||
# publish-to-testpypi:
|
publish-to-testpypi:
|
||||||
# name: Publish Python 🐍 distribution 📦 to TestPyPI
|
name: Publish Python 🐍 distribution 📦 to TestPyPI
|
||||||
# needs:
|
needs:
|
||||||
# - build
|
- build
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# environment:
|
environment:
|
||||||
# name: testpypi
|
name: testpypi
|
||||||
# url: https://test.pypi.org/p/goat_monitor
|
url: https://test.pypi.org/p/goat_monitor
|
||||||
|
|
||||||
# permissions:
|
permissions:
|
||||||
# id-token: write # IMPORTANT: mandatory for trusted publishing
|
id-token: write # IMPORTANT: mandatory for trusted publishing
|
||||||
|
|
||||||
# env:
|
env:
|
||||||
# RUNNER_TOOL_CACHE: /toolcache # https://about.gitea.com/resources/tutorials/enable-gitea-actions-cache-to-accelerate-cicd
|
RUNNER_TOOL_CACHE: /toolcache # https://about.gitea.com/resources/tutorials/enable-gitea-actions-cache-to-accelerate-cicd
|
||||||
# AGENT_TOOLSDIRECTORY: /toolcache # https://github.com/actions/setup-python/issues/824
|
AGENT_TOOLSDIRECTORY: /toolcache # https://github.com/actions/setup-python/issues/824
|
||||||
|
|
||||||
# steps:
|
steps:
|
||||||
# - name: Download all the dists
|
- name: Download all the dists
|
||||||
# uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# name: python-package-distributions
|
name: python-package-distributions
|
||||||
# path: dist/
|
path: dist/
|
||||||
# - name: Publish distribution 📦 to TestPyPI
|
- name: Publish distribution 📦 to TestPyPI
|
||||||
# uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
# with:
|
with:
|
||||||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||||
# repository-url: https://test.pypi.org/legacy/
|
repository-url: https://test.pypi.org/legacy/
|
@ -11,6 +11,7 @@ Configuration lives in a TOML file which should have (at a minimum) the followin
|
|||||||
```toml
|
```toml
|
||||||
server = "https://gotify.example.com"
|
server = "https://gotify.example.com"
|
||||||
app_token = "app_token_from_gotify"
|
app_token = "app_token_from_gotify"
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -98,12 +98,13 @@ def wrap(command: List[str], config: Path, retries: int, version: bool, dry_run:
|
|||||||
|
|
||||||
MAX_LINES = 20
|
MAX_LINES = 20
|
||||||
lines = stdout.splitlines()
|
lines = stdout.splitlines()
|
||||||
truncated = False
|
|
||||||
if len(lines) > MAX_LINES:
|
if len(lines) > MAX_LINES:
|
||||||
truncated = True
|
|
||||||
lines = lines[-MAX_LINES:]
|
lines = lines[-MAX_LINES:]
|
||||||
message = (
|
message = (
|
||||||
"Command:\n" + " ".join(command) + f'\n\nResult{ " (truncated)" if truncated else ""}:\n' + "\n".join(lines)
|
"Command:\n"
|
||||||
|
+ " ".join(command)
|
||||||
|
+ f'\n\nResult{ " (truncated)" if len(lines) > MAX_LINES else ""}:\n'
|
||||||
|
+ "\n".join(lines)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user