https://github.com/jcbhmr/setup-code-server
💻 Install code-server to run a local VS Code web instance
https://github.com/jcbhmr/setup-code-server
code-server github-actions setup-actions vscode web-ide
Last synced: 9 months ago
JSON representation
💻 Install code-server to run a local VS Code web instance
- Host: GitHub
- URL: https://github.com/jcbhmr/setup-code-server
- Owner: jcbhmr
- License: mit
- Created: 2023-07-27T05:27:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-05T22:41:25.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T17:14:16.699Z (11 months ago)
- Topics: code-server, github-actions, setup-actions, vscode, web-ide
- Language: Shell
- Homepage:
- Size: 3.02 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup Coder code-server
💻 Install [code-server] to run a local VS Code web instance

🌎 Installs `code-server` globally \
👨💻 Host your own VS Code web instance to debug CI \
🐧 Works on Linux and macOS runners \
⚠️ Not recommended as your primary IDE \
🚀 No config!
## Usage


🛑 You will **not be able to connect** to the `localhost:4000` server unless you
use a tunneling service like [Try Cloudflare] or [ngrok] to expose the HTTP
server to the rest of the world.
This GitHub Action will install the `code-server` binary globally. That means
you can spin up your own local VS Code instance running _on the GitHub Actions
runner_ at any point in your workflow! This is great for diving into a full IDE
(if you need it) to diagnose a problem. For example, debugging the post-build
folder structure and contents of a complex C++ project. Here's a quick demo of
using `code-server` & `cloudflared` to expose a VS Code web instance to the
entire world via [Try Cloudflare].
```yml
on: workflow_dispatch
jobs:
code-server:
runs-on: ubuntu-latest
steps:
- uses: jcbhmr/setup-code-server@v1
- uses: debugci/setup-cloudflared@v1
- run: nohup code-server --auth none --bind-addr 0.0.0.0:4000 &
- run: nohup cloudflared tunnel --url http://localhost:4000 &
- run: sleep 5m
```
📚 Make sure you check out [the code-server documentation] for a full list of
all the options that you can play around with!
⚠️ Make sure you're aware of [the limits of GitHub Actions]!
### Options
There's currently only a single option to specify the version. [Open an Issue]
if there's more options you'd like to see! ❤️
- **`code-server-version`:** Which version of code-server to install. This defaults to the latest stable release. Use `edge` to download the latest prerelease, or a `N.N.N` versions specifier if you wish. Use `latest` (the default) to download the latest version. This field **does not** support semver specifiers.
## Development

This GitHub Action is so simple that we can get away with using plain Bash. To
get started, create a new fork/branch and open a PR! There's some tests in the
`test-action.ym` workflow that will run to make sure everything "works".
[code-server]: https://github.com/coder/code-server
[the code-server documentation]: https://coder.com/docs/code-server/latest/guide
[try cloudflare]: https://try.cloudflare.com/
[the limits of GitHub Actions]: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
[ngrok]: https://ngrok.com/
[open an issue]: https://github.com/debugci/setup-code-server/issues