-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.6 KB
/
docker.yml
File metadata and controls
82 lines (70 loc) · 2.6 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Docker
on:
push:
branches:
- 'master'
tags:
- 'ilp-node-*'
- 'ilp-cli-*'
jobs:
update-docker-images:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y redis-server redis-tools libssl-dev
- name: Install node
uses: actions/setup-node@v2
with:
node-version: 'v12.18.4'
- name: Get tags
id: tags
run: |
TAG=${GITHUB_REF#refs/tags/}
if [ $TAG = "refs/heads/master" ]; then
TAG=""
fi
echo ::set-output name=tag::${TAG}
ILP_NODE_IMAGE_TAG=$(./.circleci/release/get_docker_image_tag.sh ilp-node ${TAG})
echo ::set-output name=ilp_node_image_tag::${ILP_NODE_IMAGE_TAG}
echo "ilp node image tag: ${ILP_NODE_IMAGE_TAG}"
ILP_NODE_CLI_IMAGE_TAG=$(./.circleci/release/get_docker_image_tag.sh ilp-cli ${TAG})
echo ::set-output name=ilp_node_cli_image_tag::${ILP_NODE_CLI_IMAGE_TAG}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Build and push ilp-node in the case of push to master or tag with 'ilp-node-*'
- name: Build ilp-node
if: startsWith(steps.tags.outputs.tag, 'ilp-cli-') != true
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/ilp-node.dockerfile
push: true
tags: interledgerrs/ilp-node:${{steps.tags.outputs.ilp_node_image_tag}}
build-args: |
CARGO_BUILD_OPTION=--release
RUST_BIN_DIR_NAME=release
# Build and push together with ilp-node in the case of push to master or tag with 'ilp-node-*'
- name: Build ilp-testnet
if: startsWith(steps.tags.outputs.tag, 'ilp-cli-') != true
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile
push: true
tags: interledgerrs/testnet-bundle:${{steps.tags.outputs.ilp_node_image_tag}}
# Build and push in the case of push to master or tag with `ilp-cli-*`
- name: Build ilp-cli
if: startsWith(steps.tags.outputs.tag, 'ilp-node-') != true
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/ilp-cli.dockerfile
push: true
tags: interledgerrs/ilp-cli:${{steps.tags.outputs.ilp_node_cli_image_tag}}