Skip to content

Commit

Permalink
Docker release workflow (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: David Salami <[email protected]>
  • Loading branch information
seunlanlege and Wizdave97 authored Oct 1, 2023
1 parent 08299c3 commit 6c23bb0
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 4 deletions.
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

0 comments on commit 6c23bb0

Please sign in to comment.