Skip to content

Commit f615e3b

Browse files
committed
chore: test github docker builder
1 parent fe579d6 commit f615e3b

File tree

3 files changed

+40
-9
lines changed

3 files changed

+40
-9
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- docker-image
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v4
15+
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v2
18+
with:
19+
username: ${{ secrets.DOCKER_USER }}
20+
password: ${{ secrets.DOCKER_PASS }}
21+
22+
- name: Build and Push Docker Image
23+
uses: docker/build-push-action@v6
24+
with:
25+
build-args: NODE_TYPE=standalone-node
26+
context: .
27+
file: Dockerfile
28+
platforms: linux/amd64
29+
tags: |
30+
kiltprotocol/kilt-node:latest-develop
31+
kiltprotocol/kilt-node:${{ github.sha }}

.maintain/build-image.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ target_tag=$1
77
# Build the builder image and push it in the background
88
docker build \
99
--target builder \
10-
--cache-from $AWS_REGISTRY/kilt-parachain/collator:builder \
11-
-t $AWS_REGISTRY/kilt-parachain/collator:builder \
10+
--cache-from $AWS_REGISTRY/kilt-node:builder \
11+
-t $AWS_REGISTRY/kilt-node:builder \
1212
. &
13-
docker push $AWS_REGISTRY/kilt-parachain/collator:builder &
13+
docker push $AWS_REGISTRY/kilt-node:builder &
1414

1515
wait
1616

@@ -21,19 +21,19 @@ build_and_tag() {
2121
local cache_image=$3
2222

2323
docker build \
24-
--cache-from $AWS_REGISTRY/kilt-parachain/collator:builder \
24+
--cache-from $AWS_REGISTRY/kilt-node:builder \
2525
--cache-from $AWS_REGISTRY/$cache_image:$target_tag \
2626
--build-arg NODE_TYPE=$node_type \
2727
-t local/$image_name:$target_tag \
2828
.
2929
}
3030

31-
build_and_tag "kilt-parachain" "kilt-node" "kilt-parachain/collator" &
31+
build_and_tag "kilt-parachain" "kilt-node" "kilt-node" &
3232

33-
build_and_tag "standalone-node" "standalone-node" "kilt/prototype-chain" &
33+
build_and_tag "standalone-node" "standalone-node" "standalone-node" &
3434

35-
build_and_tag "dip-provider-node-template" "dip-provider-node-template" "kilt-parachain/collator" &
35+
build_and_tag "dip-provider-node-template" "dip-provider-node-template" "kilt-node" &
3636

37-
build_and_tag "dip-consumer-node-template" "dip-consumer-node-template" "kilt-parachain/collator" &
37+
build_and_tag "dip-consumer-node-template" "dip-consumer-node-template" "kilt-node" &
3838

3939
wait

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN cargo build --locked --release --features $FEATURES
1313

1414
# ===== SECOND STAGE ======
1515

16-
FROM docker.io/library/ubuntu:20.04
16+
FROM docker.io/library/ubuntu:22.04
1717
LABEL description="This is the 2nd stage: a very small image where we copy the kilt-parachain binary."
1818

1919
ARG NODE_TYPE=kilt-parachain

0 commit comments

Comments
 (0)