WPB-2970 Update dependencies, cleanup, add unit test #121
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ["2.4"] | |
ghc: | |
- "8.8.3" | |
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: | | |
echo 'No tests' | |
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 }}" |