-
Notifications
You must be signed in to change notification settings - Fork 52
60 lines (49 loc) · 1.85 KB
/
hyperbridge-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Hyperbridge Docker Publish
on:
push:
tags:
- "hyperbridge-v[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: release-${{ 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 toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: stable
- name: Add wasm toolchain
run: |
sudo apt-get update
sudo apt-get install --assume-yes pkg-config git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
rustup install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup target add wasm32-unknown-unknown
rustup component add rust-src
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
- name: Build
run: |
cargo build --release -p 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/hyperbridge.Dockerfile .
- name: Docker Push
run: |
docker push polytopelabs/hyperbridge:v$(cargo get package.version --entry ./parachain/node)
docker push polytopelabs/hyperbridge:latest