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

Docker release workflow #32

Merged
merged 10 commits into from
Oct 1, 2023
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
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build_and_publish:
runs-on: release-runner
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive

- uses: webfactory/[email protected]
with:
ssh-private-key: "${{ secrets.SSH_KEY }}"

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.9.1'

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly

- name: Add wasm toolchain
run: rustup target add wasm32-unknown-unknown

- name: Build
run: |
cargo +nightly build --release -p hyperbridge --features goerli
mv ./target/release/hyperbridge ./

- name: Install Cargo get
run: cargo install cargo-get

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Build the Docker image
run: docker build -t polytopelabs/hyperbridge:v$(cargo get package.version --entry ./parachain/node) -t polytopelabs/hyperbridge:latest -f ./scripts/docker/slim.Dockerfile .

- name: Docker Push
run: |
docker push polytopelabs/hyperbridge:v$(cargo get package.version --entry ./parachain/node)
docker push polytopelabs/hyperbridge:latest
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v1
- run: rustup target add wasm32-unknown-unknown
- run: rustup target add wasm32-unknown-unknown --toolchain nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion 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 parachain/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hyperbridge"
version = "0.1.0"
version = "0.1.2"
authors = ["Polytope Labs <[email protected]>"]
description = "The Hyperbridge parachain node"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("hyperbridge"),
impl_name: create_runtime_str!("hyperbridge"),
authoring_version: 1,
spec_version: 100,
spec_version: 101,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Loading