Skip to content

Commit 07f5c63

Browse files
committed
prepare for docker builds in CI
1 parent b46c8c7 commit 07f5c63

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/docker.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: EasyCrypt Docker Containers Build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'latest'
8+
tags:
9+
- 'r[0-9]+.[0-9]+'
10+
workflow_dispatch:
11+
12+
jobs:
13+
make-images:
14+
name: Build Container Images
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build `base` Image
19+
run: TAG=${{ github.ref_name }} VARIANT=base make -C scripts/docker
20+
- name: Build `build` Image
21+
run: TAG=${{ github.ref_name }} VARIANT=build make -C scripts/docker
22+
- name: Build `formosa` Image
23+
run: TAG=${{ github.ref_name }} VARIANT=formosa make -C scripts/docker
24+

scripts/docker/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# --------------------------------------------------------------------
44
VARIANT ?= build
5+
TAG ?= main
56

67
# --------------------------------------------------------------------
78
.PHONY: default build publish
@@ -11,8 +12,8 @@ default: build
1112
build:
1213
docker build -f Dockerfile.$(VARIANT) \
1314
--platform linux/amd64 \
14-
-t ghcr.io/easycrypt/ec-$(VARIANT)-box \
15+
-t ghcr.io/easycrypt/ec-$(VARIANT)-box:$(TAG) \
1516
.
1617

1718
publish:
18-
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box
19+
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box:$(TAG)

0 commit comments

Comments
 (0)