Skip to content
Draft
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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build base image
if: github.event_name == 'push'
run: make -C scripts/docker build VARIANT=base TAG=$IMAGE_TAG
- name: Retrieve base image
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
run: |
docker pull ghcr.io/easycrypt/ec-base-box:main
docker tag ghcr.io/easycrypt/ec-base-box:main ghcr.io/easycrypt/ec-base-box:$IMAGE_TAG
- name: Build build image
run: make -C scripts/docker build VARIANT=build TAG=$IMAGE_TAG
run: make -C scripts/docker build VARIANT=build TAG=$IMAGE_TAG BARGS='--build-arg BASE_LAYER=ghcr.io/easycrypt/ec-base-box:${IMAGE_TAG}'
- name: Save images for downstream jobs
run: |
docker save "ghcr.io/easycrypt/ec-base-box:$IMAGE_TAG" | gzip > base-image.tar.gz
Expand Down Expand Up @@ -228,12 +234,7 @@ jobs:
publish:
name: Publish Docker images
if: |
github.event_name == 'push' && (
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/release' ||
github.ref == 'refs/heads/latest' ||
startsWith(github.ref, 'refs/tags/r')
)
github.event_name == 'push'
needs: [compile-opam, compile-nix, check, external, external-status, docker]
runs-on: ubuntu-24.04
permissions:
Expand Down Expand Up @@ -266,8 +267,7 @@ jobs:
github.ref == 'refs/heads/latest' ||
github.ref_type == 'tag'
run: |
make -C scripts/docker build VARIANT=test TAG=${{ github.ref_name }}
make -C scripts/docker publish VARIANT=test TAG=${{ github.ref_name }}
make -C scripts/docker build publish VARIANT=test TAG=${{ github.ref_name }} BARGS='--build-arg BUILD_LAYER=ghcr.io/easycrypt/ec-build-box:${{ github.ref_name }}'

# ── Notification ──

Expand Down
Loading