Skip to content

Build and Push Docker Images #29

Build and Push Docker Images

Build and Push Docker Images #29

Workflow file for this run

name: Build and Push Docker Images
on:
schedule:
# Every Monday at 04:00 UTC
- cron: '0 4 * * 1'
workflow_dispatch: # Allow manual trigger
env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}
jobs:
build-base:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Base Image
run: |
docker build -t ${{ env.IMAGE_PREFIX }}/base ./base
docker push ${{ env.IMAGE_PREFIX }}/base
build-ocaml:
needs: build-base
strategy:
fail-fast: false
matrix:
ocaml-compiler: [ "4.14", "5.3", "5.4" ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push OCaml ${{ matrix.ocaml-compiler }} Image
run: |
docker build -t ${{ env.IMAGE_PREFIX }}/ocaml-${{ matrix.ocaml-compiler }} ./ocaml-${{ matrix.ocaml-compiler }}
docker push ${{ env.IMAGE_PREFIX }}/ocaml-${{ matrix.ocaml-compiler }}
build-z3:
needs: build-ocaml
strategy:
fail-fast: false
matrix:
ocaml-compiler: [ "4.14", "5.4" ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push OCaml ${{ matrix.ocaml-compiler }} Z3 Images
run: |
docker build -t ${{ env.IMAGE_PREFIX }}/ocaml-${{ matrix.ocaml-compiler }}-z3 ./ocaml-${{ matrix.ocaml-compiler }}-z3
docker push ${{ env.IMAGE_PREFIX }}/ocaml-${{ matrix.ocaml-compiler }}-z3
build-cvc5:
needs: build-ocaml
strategy:
fail-fast: false
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push OCaml 5.4 cvc5 Images
run: |
docker build -t ${{ env.IMAGE_PREFIX }}/ocaml-5.4-cvc5 ./ocaml-5.4-cvc5
docker push ${{ env.IMAGE_PREFIX }}/ocaml-5.4-cvc5