Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build & publish docker image as part of release CI #376

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build & publish Docker image

on:
release:
types: [released]

jobs:
build-and-publish-docker:
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-prebuilt
push: true
build-args: VERSION=tags/${{ github.ref_name }}
tags: ghcr.io/liberland/blockchain-node:${{ github.ref_name }},ghcr.io/liberland/blockchain-node:latest
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile-prebuilt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN curl -sSL https://api.github.com/repos/liberland/liberland_substrate/release
RUN curl -sSL "$(jq -r '.assets[] | select(.name == "linux_x86_build") | .browser_download_url' < relinfo)" -o node

FROM debian:bullseye-slim
EXPOSE 30333 9933 9944
EXPOSE 30333 9944
VOLUME /data
RUN useradd -Ms /bin/bash liberland
COPY --from=downloader /app/node /node
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-source
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY substrate/ .
RUN cargo build --release

FROM debian:buster-slim AS runtime
EXPOSE 30333 9933 9944
EXPOSE 30333 9944
VOLUME /data
COPY --from=builder /app/target/release/substrate /node
COPY substrate/specs /specs
Expand Down
4 changes: 2 additions & 2 deletions substrate/bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "node-cli"
version = "3.0.0-dev"
version = "21.0.0"
authors.workspace = true
description = "Generic Substrate node implementation in Rust."
description = "Liberland node implementation in Rust."
build = "build.rs"
edition.workspace = true
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
Expand Down
2 changes: 1 addition & 1 deletion substrate/bin/node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kitchensink-runtime"
version = "3.0.0-dev"
version = "21.0.0"
authors.workspace = true
description = "Substrate node kitchensink runtime."
edition.workspace = true
Expand Down
Loading