Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 6, 2024
1 parent d732686 commit 588b0a2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:

- name: Publish
run: poetry run tag-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch || true
if: failure()
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ It can also contain the following sentences:

See also [GitHub Documentation](https://docs.github.com/en/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository)

## Publishing
## Configuration

### Dry run

Dry run publish: `GITHUB_REF=... c2cciutils-publish --dry-run ...`

### To pypi

Expand Down
14 changes: 5 additions & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ security-md = "0.2.3"
application-download = "0.0.1.dev3"
PyGithub = "2.4.0"
debian-inspector = "31.1.0"
multi-repo-automation = "1.3.0"
multi-repo-automation = "1.4.1"

[tool.poetry.group.dev.dependencies]
prospector = { version = "1.12.1", extras = ["with-bandit", "with-mypy", "with-pyroma"] }
Expand Down
7 changes: 1 addition & 6 deletions tag_publish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Any, Optional, TypedDict, cast

import github
import multi_repo_automation as mra
import requests
import ruamel.yaml
import security_md
Expand All @@ -33,11 +32,7 @@ class GH:

def __init__(self) -> None:
"""Initialize the GitHub helper class."""
token = (
os.environ["GITHUB_TOKEN"]
if "GITHUB_TOKEN" in os.environ
else mra.get("gh", "auth", "token").strip()
)
token = os.environ["GITHUB_TOKEN"]
self.auth = github.Auth.Token(token)
self.github = github.Github(auth=self.auth)
self.repo = self.github.get_repo(os.environ["GITHUB_REPOSITORY"])
Expand Down

0 comments on commit 588b0a2

Please sign in to comment.