Skip to content

Commit ff34097

Browse files
authored
Merge pull request #1 from cdr/main
Merge cdr/main into galesky/main
2 parents 316c3aa + bc3acb0 commit ff34097

File tree

34 files changed

+575
-126
lines changed

34 files changed

+575
-126
lines changed

.github/ranger.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ labels:
1515
"squash when passing": merge
1616
"rebase when passing": merge
1717
"merge when passing": merge
18-
stale:
19-
action: close
20-
delay: 7 days
21-
comment: "⚠️ This issue has been marked stale and will automatically be closed in $DELAY."
2218
"new contributor":
2319
action: comment
2420
delay: 5s

.github/stale.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 180
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 5
5+
# Label to apply when stale.
6+
staleLabel: stale
7+
# Comment to post when marking an issue as stale. Set to `false` to disable
8+
markComment: >
9+
This issue has been automatically marked as stale because it has not had
10+
recent activity. It will be closed if no activity occurs in the next 5 days.
11+
# Comment to post when closing a stale issue. Set to `false` to disable
12+
closeComment: false

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ jobs:
420420
uses: actions/checkout@v2
421421
- name: Run Trivy vulnerability scanner in repo mode
422422
#Commit SHA for v0.0.17
423-
uses: aquasecurity/trivy-action@9438b49cc3156b2e8c77c1ba8ffbaa3bae24e3c2
423+
uses: aquasecurity/trivy-action@8eccb5539730451af599c84f444c6d6cf0fc2bb0
424424
with:
425425
scan-type: "fs"
426426
scan-ref: "."

.github/workflows/docs-preview.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Docs preview
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
actions: none
10+
checks: none
11+
contents: read
12+
deployments: none
13+
issues: none
14+
packages: none
15+
pull-requests: write
16+
repository-projects: none
17+
security-events: none
18+
statuses: none
19+
20+
jobs:
21+
preview:
22+
name: Docs preview
23+
runs-on: ubuntu-20.04
24+
steps:
25+
- name: Cancel Previous Runs
26+
uses: styfle/[email protected]
27+
28+
- name: Checkout m
29+
uses: actions/checkout@v2
30+
with:
31+
repository: cdr/m
32+
ref: refs/heads/master
33+
token: ${{ secrets.GH_ACCESS_TOKEN }}
34+
submodules: true
35+
fetch-depth: 0
36+
37+
- name: Install Node.js
38+
uses: actions/setup-node@v2
39+
with:
40+
node-version: 12.x
41+
42+
- name: Cache Node Modules
43+
uses: actions/cache@v2
44+
with:
45+
path: "/node_modules"
46+
key: node-${{ hashFiles('yarn.lock') }}
47+
48+
- name: Create Deployment
49+
id: deployment
50+
run: ./ci/scripts/github_deployment.sh create
51+
env:
52+
GITHUB_TOKEN: ${{ github.token }}
53+
DEPLOY_ENVIRONMENT: codercom-preview-docs
54+
55+
- name: Deploy Preview to Vercel
56+
id: preview
57+
run: ./ci/scripts/deploy_vercel.sh
58+
env:
59+
VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r
60+
VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd
61+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
62+
CODE_SERVER_DOCS_MAIN_BRANCH: ${{ github.event.pull_request.head.sha }}
63+
64+
- name: Install node_modules
65+
run: yarn install
66+
67+
- name: Check docs
68+
run: yarn ts-node ./product/coder.com/site/scripts/checkDocs.ts
69+
env:
70+
BASE_URL: ${{ steps.preview.outputs.url }}
71+
72+
- name: Update Deployment
73+
# If we don't specify always, it won't run this check if failed.
74+
# This means the deployment would be stuck pending.
75+
if: always()
76+
run: ./ci/scripts/github_deployment.sh update
77+
env:
78+
GITHUB_DEPLOYMENT: ${{ steps.deployment.outputs.id }}
79+
GITHUB_TOKEN: ${{ github.token }}
80+
DEPLOY_STATUS: ${{ steps.preview.outcome }}
81+
DEPLOY_URL: ${{ steps.preview.outputs.url }}
82+
83+
- name: Comment Credentials
84+
uses: marocchino/sticky-pull-request-comment@v2
85+
if: always()
86+
with:
87+
header: codercom-preview-docs
88+
message: |
89+
✨ Coder.com for PR #${{ github.event.number }} deployed! It will be updated on every commit.
90+
91+
* _Host_: ${{ steps.preview.outputs.url }}/docs/code-server
92+
* _Last deploy status_: ${{ steps.preview.outcome }}
93+
* _Commit_: ${{ github.event.pull_request.head.sha }}
94+
* _Workflow status_: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

ci/build/build-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bundle_code_server() {
4848
{
4949
"commit": "$(git rev-parse HEAD)",
5050
"scripts": {
51-
"postinstall": "./postinstall.sh"
51+
"postinstall": "bash ./postinstall.sh"
5252
}
5353
}
5454
EOF

ci/build/build-vscode.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ main() {
1010
cd "$(dirname "${0}")/../.."
1111
cd lib/vscode
1212

13-
yarn gulp compile-build compile-extensions-build
13+
yarn gulp compile-build compile-extensions-build compile-extension-media
1414
yarn gulp optimize --gulpfile ./coder.js
1515
if [[ $MINIFY ]]; then
1616
yarn gulp minify --gulpfile ./coder.js

ci/helm-chart/values.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@ ingress:
5757

5858
# Optional additional arguments
5959
extraArgs: []
60-
# - --allow-http
61-
# - --no-auth
60+
# These are the arguments normally passed to code-server; run
61+
# code-server --help for a list of available options.
62+
#
63+
# Each argument and parameter must have its own entry; if you use
64+
# --param value on the command line, then enter it here as:
65+
#
66+
# - --param
67+
# - value
68+
#
69+
# If you receive an error like "Unknown option --param value", it may be
70+
# because both the parameter and value are specified as a single argument,
71+
# rather than two separate arguments (e.g. "- --param value" on a line).
6272

6373
# Optional additional environment variables
6474
extraVars: []

ci/release-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:10
1+
FROM debian:11
22

33
RUN apt-get update \
44
&& apt-get install -y \

ci/release-image/docker-bake.hcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ group "default" {
1212

1313
target "code-server" {
1414
dockerfile = "ci/release-image/Dockerfile"
15-
tags = ["docker.io/codercom/code-server:${VERSION}"]
15+
tags = [
16+
"docker.io/codercom/code-server:latest",
17+
notequal("latest",VERSION) ? "docker.io/codercom/code-server:${VERSION}" : "",
18+
]
1619
platforms = ["linux/amd64", "linux/arm64"]
1720
}

ci/steps/publish-npm.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ main() {
2020
download_artifact npm-package ./release-npm-package
2121
# https://github.com/actions/upload-artifact/issues/38
2222
tar -xzf release-npm-package/package.tar.gz
23+
24+
# Ignore symlink when publishing npm package
25+
# See: https://github.com/cdr/code-server/pull/3935
26+
echo "node_modules.asar" > release/.npmignore
2327
yarn publish --non-interactive release
2428
}
2529

0 commit comments

Comments
 (0)