Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: EasyCrypt Docker Containers Build

on:
push:
branches:
- 'stable'
- 'testing'
- 'docker-builds-in-ci'
tags:
- 'r[0-9]+.[0-9]+'
workflow_dispatch:

jobs:
make-images:
name: Build and Push Container Images
runs-on: ubuntu-24.04
permissions:
packages: write
steps:
- uses: actions/checkout@v4

- name: Build `base` Image
run: TAG=${{ github.ref_name }} VARIANT=base make -C scripts/docker

- name: Build `build` Image
run: TAG=${{ github.ref_name }} VARIANT=build make -C scripts/docker

- name: Build `formosa` Image
run: TAG=${{ github.ref_name }} VARIANT=formosa make -C scripts/docker

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push All Images
run: |
TAG=${{ github.ref_name }} VARIANT=base make -C scripts/docker publish
TAG=${{ github.ref_name }} VARIANT=build make -C scripts/docker publish
TAG=${{ github.ref_name }} VARIANT=formosa make -C scripts/docker publish
5 changes: 3 additions & 2 deletions scripts/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# --------------------------------------------------------------------
VARIANT ?= build
TAG ?= main

# --------------------------------------------------------------------
.PHONY: default build publish
Expand All @@ -11,8 +12,8 @@ default: build
build:
docker build -f Dockerfile.$(VARIANT) \
--platform linux/amd64 \
-t ghcr.io/easycrypt/ec-$(VARIANT)-box \
-t ghcr.io/easycrypt/ec-$(VARIANT)-box:$(TAG) \
.

publish:
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box:$(TAG)
Loading