diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..5626aafb3 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,25 @@ +name: EasyCrypt Docker Containers Build + +on: + push: + branches: + - 'main' + - 'latest' + - 'docker-builds-in-ci' + tags: + - 'r[0-9]+.[0-9]+' + workflow_dispatch: + +jobs: + make-images: + name: Build Container Images + runs-on: ubuntu-24.04 + 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 + diff --git a/scripts/docker/Makefile b/scripts/docker/Makefile index f8551c2f9..040023702 100644 --- a/scripts/docker/Makefile +++ b/scripts/docker/Makefile @@ -2,6 +2,7 @@ # -------------------------------------------------------------------- VARIANT ?= build +TAG ?= main # -------------------------------------------------------------------- .PHONY: default build publish @@ -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)