Skip to content

Bump alpine from 3.20 to 3.21 #99

Bump alpine from 3.20 to 3.21

Bump alpine from 3.20 to 3.21 #99

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
release:
types:
- published
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os:
- macos-13 # Intel (x86_64)
- macos-latest # M1 (aarch64)
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 4.03.x
- 4.04.x
- 4.05.x
- 4.06.x
- 4.07.x
- 4.08.x
- 4.09.x
- 4.10.x
- 4.11.x
- 4.12.x
- 4.13.x
- 4.14.x
- 5.0.x
- 5.1.x
- 5.2.x
exclude:
# See https://github.com/ocaml/setup-ocaml?tab=readme-ov-file#ocaml-compiler-support-matrix
- os: macos-latest
ocaml-compiler: 4.03.x
- os: macos-latest
ocaml-compiler: 4.04.x
- os: macos-latest
ocaml-compiler: 4.05.x
- os: macos-latest
ocaml-compiler: 4.06.x
- os: macos-latest
ocaml-compiler: 4.07.x
- os: macos-latest
ocaml-compiler: 4.08.x
- os: macos-latest
ocaml-compiler: 4.09.x
- os: macos-latest
ocaml-compiler: 4.11.x
- os: windows-latest
ocaml-compiler: 4.03.x
- os: windows-latest
ocaml-compiler: 4.04.x
- os: windows-latest
ocaml-compiler: 4.05.x
- os: windows-latest
ocaml-compiler: 4.06.x
- os: windows-latest
ocaml-compiler: 4.07.x
- os: windows-latest
ocaml-compiler: 4.08.x
- os: windows-latest
ocaml-compiler: 4.09.x
- os: windows-latest
ocaml-compiler: 4.10.x
- os: windows-latest
ocaml-compiler: 4.11.x
- os: windows-latest
ocaml-compiler: 4.12.x
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam install . --deps-only --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest
build-and-push-image:
runs-on: ubuntu-latest
needs:
- build-and-test
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: latest=false
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=schedule,pattern=nightly,enable=true,priority=1000
type=ref,event=branch,enable=true,priority=600
type=ref,event=tag,enable=true,priority=600
type=ref,event=pr,prefix=pr-,enable=true,priority=600
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}