mirror of
https://github.com/danog/code-server.git
synced 2024-11-30 04:39:46 +01:00
chore(ci): remove images and update publish flow (#3147)
* chore(ci): remove unmaintained images * chore(ci): update publish workflow
This commit is contained in:
parent
006438db33
commit
cbc2e8bc92
18
.github/workflows/publish.yaml
vendored
18
.github/workflows/publish.yaml
vendored
@ -9,26 +9,28 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# NOTE: this job requires curl, jq and yarn
|
||||||
|
# All of them are included in ubuntu-latest.
|
||||||
npm:
|
npm:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Run ./ci/steps/publish-npm.sh
|
- name: Run ./ci/steps/publish-npm.sh
|
||||||
uses: ./ci/images/debian10
|
run: ./ci/steps/publish-npm.sh
|
||||||
with:
|
|
||||||
args: ./ci/steps/publish-npm.sh
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
# NOTE: this job requires curl, jq and docker
|
||||||
|
# All of them are included in ubuntu-latest.
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Run ./ci/steps/push-docker-manifest.sh
|
- name: Run ./ci/steps/push-docker-manifest.sh
|
||||||
uses: ./ci/images/debian10
|
run: ./ci/steps/push-docker-manifest.sh
|
||||||
with:
|
|
||||||
args: ./ci/steps/push-docker-manifest.sh
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
main() {
|
|
||||||
cd "$(dirname "$0")/../../.."
|
|
||||||
source ./ci/lib.sh
|
|
||||||
mkdir -p .home
|
|
||||||
|
|
||||||
docker run \
|
|
||||||
-it \
|
|
||||||
--rm \
|
|
||||||
-v "$PWD:/src" \
|
|
||||||
-e HOME="/src/.home" \
|
|
||||||
-e USER="coder" \
|
|
||||||
-e GITHUB_TOKEN \
|
|
||||||
-e KEEP_MODULES \
|
|
||||||
-e MINIFY \
|
|
||||||
-w /src \
|
|
||||||
-p 127.0.0.1:8080:8080 \
|
|
||||||
-u "$(id -u):$(id -g)" \
|
|
||||||
-e CI \
|
|
||||||
"$(docker_build ./ci/images/"${IMAGE-debian10}")" \
|
|
||||||
"$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
docker_build() {
|
|
||||||
docker build "$@" >&2
|
|
||||||
docker build -q "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
@ -1,30 +0,0 @@
|
|||||||
FROM centos:7
|
|
||||||
|
|
||||||
ARG NODE_VERSION=v12.18.4
|
|
||||||
RUN ARCH="$(uname -m | sed 's/86_64/64/; s/aarch64/arm64/')" && \
|
|
||||||
curl -fsSL "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-$ARCH.tar.xz" | tar -C /usr/local -xJ && \
|
|
||||||
mv "/usr/local/node-$NODE_VERSION-linux-$ARCH" "/usr/local/node-$NODE_VERSION"
|
|
||||||
ENV PATH=/usr/local/node-$NODE_VERSION/bin:$PATH
|
|
||||||
RUN npm install -g yarn
|
|
||||||
|
|
||||||
RUN yum groupinstall -y 'Development Tools'
|
|
||||||
RUN yum install -y python2
|
|
||||||
|
|
||||||
RUN npm config set python python2
|
|
||||||
|
|
||||||
RUN yum install -y epel-release && yum install -y jq
|
|
||||||
RUN yum install -y rsync
|
|
||||||
|
|
||||||
# Install Go.
|
|
||||||
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')" && \
|
|
||||||
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
|
|
||||||
ENV GOPATH=/gopath
|
|
||||||
# Ensures running this image as another user works.
|
|
||||||
RUN mkdir -p $GOPATH && chmod -R 777 $GOPATH
|
|
||||||
ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
|
|
||||||
|
|
||||||
# Install Go dependencies
|
|
||||||
ENV GO111MODULE=on
|
|
||||||
RUN go get github.com/goreleaser/nfpm/cmd/nfpm@v2.3.1
|
|
||||||
|
|
||||||
RUN curl -fsSL https://get.docker.com | sh
|
|
@ -57,13 +57,6 @@ yarn watch
|
|||||||
# Visit http://localhost:8080 once the build is completed.
|
# Visit http://localhost:8080 once the build is completed.
|
||||||
```
|
```
|
||||||
|
|
||||||
To develop inside an isolated Docker container:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
./ci/dev/image/run.sh yarn
|
|
||||||
./ci/dev/image/run.sh yarn watch
|
|
||||||
```
|
|
||||||
|
|
||||||
`yarn watch` will live reload changes to the source.
|
`yarn watch` will live reload changes to the source.
|
||||||
|
|
||||||
### Updating VS Code
|
### Updating VS Code
|
||||||
@ -89,7 +82,9 @@ To update VS Code, follow these steps:
|
|||||||
You can build using:
|
You can build using:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./ci/dev/image/run.sh ./ci/steps/release.sh
|
yarn build
|
||||||
|
yarn build:vscode
|
||||||
|
yarn release
|
||||||
```
|
```
|
||||||
|
|
||||||
Run your build with:
|
Run your build with:
|
||||||
@ -101,24 +96,7 @@ yarn --production
|
|||||||
node .
|
node .
|
||||||
```
|
```
|
||||||
|
|
||||||
Build the release packages (make sure that you run `./ci/steps/release.sh` first):
|
Build the release packages (make sure that you run `yarn release` first):
|
||||||
|
|
||||||
```shell
|
|
||||||
IMAGE=centos7 ./ci/dev/image/run.sh ./ci/steps/release-packages.sh
|
|
||||||
# The standalone release is in ./release-standalone
|
|
||||||
# .deb, .rpm and the standalone archive are in ./release-packages
|
|
||||||
```
|
|
||||||
|
|
||||||
The `release.sh` script is equal to running:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yarn
|
|
||||||
yarn build
|
|
||||||
yarn build:vscode
|
|
||||||
yarn release
|
|
||||||
```
|
|
||||||
|
|
||||||
And `release-packages.sh` is equal to:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn release:standalone
|
yarn release:standalone
|
||||||
@ -126,12 +104,10 @@ yarn test:standalone-release
|
|||||||
yarn package
|
yarn package
|
||||||
```
|
```
|
||||||
|
|
||||||
For a faster release build, you can run instead:
|
NOTE: On Linux, the currently running distro will become the minimum supported version.
|
||||||
|
In our GitHub Actions CI, we use CentOS 7 for maximum compatibility.
|
||||||
```shell
|
If you need your builds to support older distros, run the build commands
|
||||||
KEEP_MODULES=1 ./ci/steps/release.sh
|
inside a Docker container with all the build requirements installed.
|
||||||
node ./release
|
|
||||||
```
|
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user