Merge pull request #509 from napi-rs/upgrade-musl-image
ci: use lts alpine image
This commit is contained in:
commit
645584cfa9
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:
|
jobs:
|
||||||
build_image:
|
build_image:
|
||||||
name: Build rust-nodejs-alpine:lts
|
name: Build nodejs-rust:lts-alpine
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -22,8 +22,8 @@ jobs:
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: |
|
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
|
- name: Push docker image
|
||||||
run: |
|
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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: stable - x86_64-unknown-linux-musl - node@10
|
name: stable - x86_64-unknown-linux-musl - node@lts
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -21,27 +21,24 @@ jobs:
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/registry
|
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
|
- name: Cache cargo index
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/git
|
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: |
|
run: |
|
||||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
|
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:
|
env:
|
||||||
DOCKER_REGISTRY_URL: docker.pkg.github.com
|
DOCKER_REGISTRY_URL: docker.pkg.github.com
|
||||||
DOCKER_USERNAME: ${{ github.actor }}
|
DOCKER_USERNAME: ${{ github.actor }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
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'
|
- 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
|
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
|
- name: Unit test
|
||||||
run: |
|
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"
|
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"
|
||||||
env:
|
|
||||||
RUST_BACKTRACE: 1
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:10-alpine
|
FROM node:lts-alpine
|
||||||
|
|
||||||
ENV RUSTFLAGS="-C target-feature=-crt-static" \
|
ENV RUSTFLAGS="-C target-feature=-crt-static" \
|
||||||
PATH="/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" \
|
PATH="/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue