Skip to content

WPB-2970 Update dependencies, cleanup, add unit test #123

WPB-2970 Update dependencies, cleanup, add unit test

WPB-2970 Update dependencies, cleanup, add unit test #123

Workflow file for this run

name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
tags:
- 'v*'
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-18.04
strategy:
matrix:
cabal: ["3.10"]
ghc:
- "9.4.8"
if: "!startsWith(github.ref, 'refs/tags/v')"
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/setup-haskell@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Build
run: |
cabal v2-update
cabal v2-build --enable-tests --enable-benchmarks
- name: Test
run: |
cabal v2-test --test-show-details=always --test-option=--color
publish:
# needs : build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/v}
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ldap-scim-bridge
tags: ${{ steps.vars.outputs.tag }}
dockerfiles: |
./Dockerfile
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }} latest
registry: quay.io/wire
username: wire+ldapscimbridge
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"