Skip to content

Merge pull request #7 from pickoba/update-readme #20

Merge pull request #7 from pickoba/update-readme

Merge pull request #7 from pickoba/update-readme #20

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- ocaml-version: 4.12.1
satysfi-version: 0.0.6
satyrographos-version: 0.0.2.11
- ocaml-version: 4.12.1
satysfi-version: 0.0.7
satyrographos-version: 0.0.2.11
- ocaml-version: 4.14.1
satysfi-version: 0.0.8
satyrographos-version: 0.0.2.11
- ocaml-version: 4.14.1
satysfi-version: 0.0.10
satyrographos-version: 0.0.2.13
- ocaml-version: 4.14.1
satysfi-version: 0.0.11
satyrographos-version: 0.0.2.13
latest: true
env:
REPOSITORY_NAME: ${{ secrets.DOCKER_HUB_USERNAME }}/gitpod-satysfi
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build
uses: docker/build-push-action@v2
with:
push: false
load: true
tags: ${{ env.REPOSITORY_NAME }}:${{ matrix.satysfi-version }}
build-args: |
OCAML_VERSION=${{ matrix.ocaml-version }}
SATYSFI_VERSION=${{ matrix.satysfi-version }}
SATYROGRAPHOS_VERSION=${{ matrix.satyrographos-version }}
cache-from: type=gha,scope=${{ matrix.satysfi-version }}
cache-to: type=gha,mode=max,scope=${{ matrix.satysfi-version }}
- name: Run test
run: docker run --rm ${{ env.REPOSITORY_NAME }}:${{ matrix.satysfi-version }} satysfi --help
- name: Run test (language server)
run: docker run --rm ${{ env.REPOSITORY_NAME }}:${{ matrix.satysfi-version }} satysfi-language-server --version
- name: Push to Docker Hub
run: docker push ${{ env.REPOSITORY_NAME }}:${{ matrix.satysfi-version }}
if: github.event_name != 'pull_request'
- name: Push to Docker Hub (latest)
run: |
docker tag ${{ env.REPOSITORY_NAME }}:${{ matrix.satysfi-version }} ${{ env.REPOSITORY_NAME }}:latest
docker push ${{ env.REPOSITORY_NAME }}:latest
if: github.event_name != 'pull_request' && matrix.latest