Merge pull request #3488 from da-mask/main
Adding Github CLI to workspace
This commit is contained in:
@@ -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 ###############################################
|
||||
|
||||
|
||||
@@ -382,6 +382,41 @@ WORKSPACE_INSTALL_PHPDBG=true
|
||||
PHP_FPM_INSTALL_PHPDBG=true
|
||||
```
|
||||
|
||||
<br>
|
||||
<a name="Install-github-copilot-cli"></a>
|
||||
## Install Github Copilot Cli
|
||||
### Note: You must have Github Copilot access to use this feature.
|
||||
Install `gh-cli` in the Workspace Container:
|
||||
|
||||
<br>
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1868,6 +1868,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
|
||||
|
||||
Reference in New Issue
Block a user