Skip to content

Commit

Permalink
fix: remove GHCR_PAT requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBlenny committed Apr 3, 2023
1 parent 331d7ba commit 3bf3e7b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 18 deletions.
1 change: 0 additions & 1 deletion docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Make sure you export the following environment variables:
```bash
export GITHUB_TOKEN=<github token>
export API_TOKEN_GITHUB=<github token>
export GHCR_PAT=<github token>
export CI=true # So semantic-release actually runs
```

Expand Down
1 change: 0 additions & 1 deletion platform_cli/assets/Dockerfile.multi
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ARG PLATFORM_MODULE="platform_module"

LABEL org.opencontainers.image.source=https://github.com/Greenroom-Robotics/${PLATFORM_MODULE}

ENV GHCR_PAT=$API_TOKEN_GITHUB
ENV PLATFORM_MODULE=$PLATFORM_MODULE

RUN sudo mkdir /opt/greenroom && sudo chown ros:ros /opt/greenroom
Expand Down
1 change: 0 additions & 1 deletion platform_cli/assets/Dockerfile.single
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ARG API_TOKEN_GITHUB
ARG PACKAGE_NAME
ARG PLATFORM_MODULE

ENV GHCR_PAT=$API_TOKEN_GITHUB
ENV API_TOKEN_GITHUB=$API_TOKEN_GITHUB
ENV PLATFORM_MODULE=$PLATFORM_MODULE

Expand Down
3 changes: 1 addition & 2 deletions platform_cli/groups/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

from platform_cli.groups.base import PlatformCliGroup
from platform_cli.helpers import call, stdout_call, get_pkg_env, echo
from platform_cli.helpers import call, stdout_call, echo

GR_APT_REPO_PRIVATE = "Greenroom-Robotics/packages"
GR_APT_REPO_PUBLIC = "Greenroom-Robotics/public_packages"
Expand Down Expand Up @@ -115,7 +115,6 @@ def refresh_deps(): # type: ignore reportUnusedFunction
)
def install_deps(package: str): # type: ignore reportUnusedFunction
"""Installs rosdeps"""
get_pkg_env()
package_dir = Path.cwd()
packages = find_packages_with_colcon(package_dir)
if package and package not in packages:
Expand Down
13 changes: 0 additions & 13 deletions platform_cli/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class RosEnv(TypedDict):
ROS_OVERLAY: str


class PkgEnv(TypedDict):
GHCR_PAT: str


class LogLevels(Enum):
WARNING = "warning"
ERROR = "error"
Expand All @@ -33,15 +29,6 @@ def get_ros_env() -> RosEnv:
return cast(RosEnv, os.environ)


def get_pkg_env(abort: bool = True) -> PkgEnv:
if abort:
for env in PkgEnv.__required_keys__: # type: ignore
if env not in os.environ:
raise click.ClickException(f"{env} environment variable must be set.")

return cast(PkgEnv, os.environ)


def is_ci_environment() -> bool:
return (os.environ.get("CI") or "").lower() == "true"

Expand Down

0 comments on commit 3bf3e7b

Please sign in to comment.