From 6f5f252ccc3497c62e57f5e8e15c4da4f106735d Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 29 Mar 2022 17:14:34 -0700 Subject: [PATCH 1/2] fix(ci): add GITHUB_TOKEN to docs-preview workflow --- .github/workflows/docs-preview.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs-preview.yaml b/.github/workflows/docs-preview.yaml index 42021b5400ae..1856fe34adee 100644 --- a/.github/workflows/docs-preview.yaml +++ b/.github/workflows/docs-preview.yaml @@ -31,6 +31,7 @@ jobs: - name: Comment Credentials uses: marocchino/sticky-pull-request-comment@v2 with: + GITHUB_TOKEN: ${{ github.token }} header: codercom-preview-docs message: | ✨ code-server docs for PR #${{ github.event.number }} is ready! It will be updated on every commit. From e0f73b8f13310fe62fc291706335c92a4edd0ec4 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 29 Mar 2022 17:14:54 -0700 Subject: [PATCH 2/2] feat(ci): comment npm dev build instructions on PR --- .github/workflows/ci.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb7a4e87e1a7..4fdbc1fcd180 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -217,6 +217,26 @@ jobs: # Instead, itis determined in publish-npm.sh script # using GITHUB environment variables + - name: Comment npm information + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ github.token }} + header: npm-dev-build + message: | + ✨ code-server dev build published to npm for PR #${{ github.event.number }}! + * _Last publish status_: success + * _Commit_: ${{ github.event.pull_request.head.sha }} + + To install in a local project, run: + ```shell-session + npm install @coder/code-server-pr@${{ github.event.number }} + ``` + + To install globally, run: + ```shell-session + npm install -g @coder/code-server-pr@${{ github.event.number }} + ``` + # TODO: cache building yarn --production # possibly 2m30s of savings(?) # this requires refactoring our release scripts