-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target | ||
.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Continuous integration | ||
name: continuous-integration | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-push-docker-image: | ||
name: Build and push passive node Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Push to GitHub Packages | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: docker.pkg.github.com | ||
repository: tomaka/substrate-lite/node | ||
tag_with_ref: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM rust:1 AS builder | ||
LABEL maintainer "Pierre Krieger <[email protected]>" | ||
|
||
COPY . /build | ||
WORKDIR /build | ||
|
||
RUN apt-get update && apt-get install -y musl-tools | ||
# TODO: don't use nightly once possible | ||
RUN rustup default nightly | ||
RUN rustup target add x86_64-unknown-linux-musl | ||
RUN cargo build --target x86_64-unknown-linux-musl --bin node --release --verbose --all-features | ||
|
||
|
||
FROM alpine:latest | ||
LABEL maintainer "Pierre Krieger <[email protected]>" | ||
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/node /usr/local/bin | ||
|
||
EXPOSE 30333 | ||
CMD ["/usr/local/bin/node"] |