-
Notifications
You must be signed in to change notification settings - Fork 46
54 lines (43 loc) · 1.53 KB
/
tesseract-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
name: Tesseract Docker Publish
on:
push:
tags:
- "tesseract-v[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
env:
TELEMETRY_SECRET_KEY: ${{ secrets.TELEMETRY_SECRET_KEY }}
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: Build
run: |
sudo apt-get install -y clang netcat wget curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config
cargo build --release -p tesseract
- 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/tesseract:v$(cargo get package.version --entry ./tesseract/relayer) -t polytopelabs/tesseract:latest -f ./scripts/docker/tesseract.Dockerfile .
- name: Docker Push
run: |
docker push polytopelabs/tesseract:v$(cargo get package.version --entry ./tesseract/relayer)
docker push polytopelabs/tesseract:latest