Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better message #21

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Set the permissions:

```yaml
permissions:
# To publish Docker images on GHCR
# To publish Docker images on GHCR and on npm.pkg.github.com
packages: write
# To publish Python packages using OIDC
id-token: write
Expand Down Expand Up @@ -234,6 +234,8 @@ node:

If the repository server is `npm.pkg.github.com` we will do a login using `GITHUB_TOKEN`.

To publish on `npm.pkg.github.com` you requires the permissions are `packages: write`.

By default the package will be published only on tag.

### HELM
Expand Down
7 changes: 4 additions & 3 deletions tag_publish/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""

import argparse
import json
import os
import os.path
import re
Expand Down Expand Up @@ -515,11 +514,13 @@ def _trigger_dispatch_events(
}

if repository:
print(f"Triggering {event_type} on {repository} with {json.dumps(published)}")
print(f"::group::Triggering {event_type} on {repository}")
github_repo = github.github.get_repo(repository)
else:
print(f"Triggering {event_type} with {json.dumps(published)}")
print(f"::group::Triggering {event_type}")
github_repo = github.repo
print(yaml.dump(published, Dumper=yaml.SafeDumper, default_flow_style=False))
print("::endgroup::")
github_repo.create_repository_dispatch(event_type, {"content": published})


Expand Down
Loading