-
Notifications
You must be signed in to change notification settings - Fork 73
56 lines (54 loc) · 1.62 KB
/
turing-dev-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
name: Publish Turing Development Docker Image
on:
workflow_dispatch:
inputs:
tag:
description: Tag for release
required: true
jobs:
build-binary:
name: Build Binary
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- name: Setup Rust
run: rustup show
- name: Build
run: |
cargo build --locked --release --features turing-node,oak-node,dev-queue
mkdir -p artifacts/
cp target/release/oak-collator artifacts/
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: oak-collator
path: artifacts/
build-docker:
name: Build Docker
runs-on: ubuntu-latest
needs: build-binary
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- name: Download binary
uses: actions/download-artifact@v2
with:
name: oak-collator
- name: Build
run: |
tag=${{ github.event.inputs.tag }}
docker_tag="${tag:1}"
docker build -f ./docker/turing/Dockerfile -t oaknetwork/turing-dev:$docker_tag .
docker tag oaknetwork/turing-dev:$docker_tag oaknetwork/turing-dev:latest
docker push oaknetwork/turing-dev:$docker_tag
docker push oaknetwork/turing-dev:latest