From b194d9a4266bd8ab49facd354ba12983e49c4319 Mon Sep 17 00:00:00 2001 From: DanielFloris Date: Fri, 15 Dec 2023 11:17:18 +1100 Subject: [PATCH 1/2] gh cli is installing on workspace --- .env.example | 1 + docker-compose.yml | 1 + workspace/Dockerfile | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/.env.example b/.env.example index 6c61b8bb90..cdc64b636b 100644 --- a/.env.example +++ b/.env.example @@ -223,6 +223,7 @@ WORKSPACE_INSTALL_DNSUTILS=true WORKSPACE_XDEBUG_PORT=9000 WORKSPACE_VITE_PORT=5173 WORKSPACE_INSTALL_JDK=true +WORKSPACE_INSTALL_GITHUB_CLI=false ### PHP_FPM ############################################### diff --git a/docker-compose.yml b/docker-compose.yml index 31cff12258..37f4d895c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -179,6 +179,7 @@ services: - INSTALL_DNSUTILS=${WORKSPACE_INSTALL_DNSUTILS} - INSTALL_POPPLER_UTILS=${WORKSPACE_INSTALL_POPPLER_UTILS} - INSTALL_JDK=${WORKSPACE_INSTALL_JDK} + - INSTALL_GITHUB_CLI=${WORKSPACE_INSTALL_GITHUB_CLI} - http_proxy - https_proxy - no_proxy diff --git a/workspace/Dockerfile b/workspace/Dockerfile index bbd6611652..d8dfc8711a 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1866,6 +1866,21 @@ RUN if [ ${INSTALL_JDK} = true ]; then \ && update-ca-certificates -f \ ;fi +########################################################################### +# Github CLI: +########################################################################### + +ARG INSTALL_GITHUB_CLI=false + +RUN if [ ${INSTALL_GITHUB_CLI} = true ]; then \ + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ + && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && apt update \ + && apt install gh -y \ +;fi + + # #-------------------------------------------------------------------------- # Final Touch From 2004928350ed20c94ca5ec823fcf6c13430c611b Mon Sep 17 00:00:00 2001 From: DanielFloris Date: Fri, 15 Dec 2023 11:45:06 +1100 Subject: [PATCH 2/2] updated documentation --- DOCUMENTATION/content/documentation/index.md | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 5c95d27240..2eeaf94fcf 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -382,6 +382,41 @@ WORKSPACE_INSTALL_PHPDBG=true PHP_FPM_INSTALL_PHPDBG=true ``` +
+ +## Install Github Copilot Cli +### Note: You must have Github Copilot access to use this feature. +Install `gh-cli` in the Workspace Container: + +
+1 - Open the `.env`. + +2 - Search for `WORKSPACE_INSTALL_GITHUB_CLI`. + +3 - Set value to `true` + +```dotenv +WORKSPACE_INSTALL_GITHUB_CLI=true +``` +4 - Re-build the containers `docker compose build workspace` + +5 - start your container `docker compose up -d workspace // ..and all your other containers` + +6 - Enter the Workspace container: +```bash +docker-compose exec workspace bash +``` + +7 - Authenticate with your github account and follow the instructions:: +```bash +gh auth login +``` + +8 - Install the copilot cli: +```bash + gh extension install github/gh-copilot +``` +