ci: use lts alpine image
This commit is contained in:
parent
2ae748249d
commit
0a9d741e93
3 changed files with 11 additions and 16 deletions
6
.github/workflows/docker.yaml
vendored
6
.github/workflows/docker.yaml
vendored
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build_image:
|
||||
name: Build rust-nodejs-alpine:lts
|
||||
name: Build nodejs-rust:lts-alpine
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -22,8 +22,8 @@ jobs:
|
|||
|
||||
- name: Build docker image
|
||||
run: |
|
||||
docker build . -f alpine.Dockerfile --pull --no-cache -t docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:10-alpine
|
||||
docker build . -f alpine.Dockerfile --pull --no-cache -t docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
|
||||
- name: Push docker image
|
||||
run: |
|
||||
docker push docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:10-alpine
|
||||
docker push docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
|
|
19
.github/workflows/linux-musl.yaml
vendored
19
.github/workflows/linux-musl.yaml
vendored
|
@ -11,7 +11,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
name: stable - x86_64-unknown-linux-musl - node@10
|
||||
name: stable - x86_64-unknown-linux-musl - node@lts
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -21,27 +21,24 @@ jobs:
|
|||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: stable-alpine-node-alpine-@10-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
||||
key: stable-alpine-node-alpine-@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: stable-alpine-node-alpine-@10-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
||||
key: stable-alpine-node-alpine-@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Log in to registry
|
||||
- name: Pull docker image
|
||||
run: |
|
||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
|
||||
docker pull docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
docker tag docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
|
||||
env:
|
||||
DOCKER_REGISTRY_URL: docker.pkg.github.com
|
||||
DOCKER_USERNAME: ${{ github.actor }}
|
||||
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Pull docker image
|
||||
run: |
|
||||
docker pull docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:10-alpine
|
||||
docker tag docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:10-alpine builder
|
||||
|
||||
- name: 'Install node dependencies'
|
||||
run: docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/napi-rs -w /napi-rs builder yarn
|
||||
|
||||
|
@ -54,6 +51,4 @@ jobs:
|
|||
|
||||
- name: Unit test
|
||||
run: |
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/napi-rs -w /napi-rs builder sh -c "yarn build:test && yarn test"
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/napi-rs -w /napi-rs -e RUST_BACKTRACE=1 builder sh -c "yarn build:test && yarn test"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:10-alpine
|
||||
FROM node:lts-alpine
|
||||
|
||||
ENV RUSTFLAGS="-C target-feature=-crt-static" \
|
||||
PATH="/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" \
|
||||
|
|
Loading…
Reference in a new issue