@@ -139,6 +139,18 @@ jobs:
139139 if : steps.changed-files.outputs.any_changed == 'true'
140140 run : yarn lint:ts
141141
142+ lint-actions :
143+ name : Lint GitHub Actions
144+ runs-on : ubuntu-latest
145+ steps :
146+ - name : Checkout repo
147+ uses : actions/checkout@v3
148+ - name : Check workflow files
149+ run : |
150+ bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash)
151+ ./actionlint -color -shellcheck= -ignore "set-output"
152+ shell : bash
153+
142154 test-unit :
143155 name : Run unit tests
144156 runs-on : ubuntu-20.04
@@ -271,65 +283,6 @@ jobs:
271283 name : npm-package
272284 path : ./package.tar.gz
273285
274- npm :
275- name : Publish npm package
276- # the npm-package gets uploaded as an artifact in Build
277- # so we need that to complete before this runs
278- needs : build
279- # This environment "npm" requires someone from
280- # coder/code-server-reviewers to approve the PR before this job runs.
281- environment : npm
282- # Only run if PR comes from base repo or event is not a PR
283- # Reason: forks cannot access secrets and this will always fail
284- if : github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
285- runs-on : ubuntu-20.04
286- steps :
287- - name : Checkout repo
288- uses : actions/checkout@v3
289-
290- - name : Download artifact
291- uses : actions/download-artifact@v3
292- id : download
293- with :
294- name : " npm-package"
295- path : release-npm-package
296-
297- - name : Run ./ci/steps/publish-npm.sh
298- run : yarn publish:npm
299- env :
300- # NOTE@jsjoeio
301- # This is because npm enforces semantic versioning
302- # so it has to be a valid version. We only use this
303- # to publish dev versions from prs
304- # and beta versions from main.
305- VERSION : " 0.0.0"
306- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
307- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
308- # NOTE@jsjoeio
309- # NPM_ENVIRONMENT intentionally not set here.
310- # Instead, itis determined in publish-npm.sh script
311- # using GITHUB environment variables
312-
313- - name : Comment npm information
314- uses : marocchino/sticky-pull-request-comment@v2
315- with :
316- GITHUB_TOKEN : ${{ github.token }}
317- header : npm-dev-build
318- message : |
319- ✨ code-server dev build published to npm for PR #${{ github.event.number }}!
320- * _Last publish status_: success
321- * _Commit_: ${{ github.event.pull_request.head.sha }}
322-
323- To install in a local project, run:
324- ```shell-session
325- npm install @coder/code-server-pr@${{ github.event.number }}
326- ```
327-
328- To install globally, run:
329- ```shell-session
330- npm install -g @coder/code-server-pr@${{ github.event.number }}
331- ```
332-
333286 test-e2e :
334287 name : Run e2e tests
335288 needs : build
@@ -443,7 +396,7 @@ jobs:
443396 if : steps.caddy-cache.outputs.cache-hit != 'true'
444397 run : |
445398 gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"
446- mkdir -p ~/.cache/caddy
399+ mkdir -p ~/.cache/caddy
447400 tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
448401
449402 - name : Start Caddy
0 commit comments