name: Build on every push

on:
  push:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  version:
    uses: walt-id/waltid-identity/.github/workflows/version.yml@5eed6553d3d796a4230c0e662d631f428c2c7717
  gradle-build:
    uses: walt-id/waltid-identity/.github/workflows/gradle.yml@82cfef8abfc585a741406a1275a533e9db6619ed
    secrets: inherit
    needs: version
    with:
      version: ${{ needs.version.outputs.release_version }}
  docker-matrix:
    uses: walt-id/waltid-identity/.github/workflows/load-json.yml@70e59bbea44de0b3511bb6bd72faa553e92f7bcf
    with:
      jsonpath: ".github/workflows/data/docker-matrix.json"
  docker:
    uses: walt-id/waltid-identity/.github/workflows/docker.yml@69b0349a4d83b3183475baf7cd512d54f5541af8
    secrets: inherit
    needs: [ version, docker-matrix ]
    with:
      images: ${{ needs.docker-matrix.outputs.json }}
      version: ${{ needs.version.outputs.release_version }}
      artifact: true
  api-docker-matrix:
    uses: walt-id/waltid-identity/.github/workflows/load-json.yml@70e59bbea44de0b3511bb6bd72faa553e92f7bcf
    with:
      jsonpath: ".github/workflows/data/api-docker-matrix.json"
  api-docker:
    uses: walt-id/waltid-identity/.github/workflows/api-docker.yml@563c196ae5dcbfdbaa1cd5d9a08d94efc331fa34
    secrets: inherit
    needs: [ version, api-docker-matrix ]
    with:
      images: ${{ needs.api-docker-matrix.outputs.json }}
      version: ${{ needs.version.outputs.release_version }}
      artifact: true
  ebsi-ct-v3:
    # disabled job because of ebsi certificate issues (expired certificate)
    if: false
    uses: walt-id/waltid-identity/.github/workflows/ebsictv3.yml@70e59bbea44de0b3511bb6bd72faa553e92f7bcf
    needs: [ version, docker, api-docker ]
    secrets: inherit
    with:
      artifact: issuer-api
      tag: "waltid/issuer-api:${{ needs.version.outputs.release_version }}"
  compose-test:
    uses: walt-id/waltid-identity/.github/workflows/docker-compose-testing.yml@a35cb7a55c0760097214b15db938d49287fdd96c
    needs: [ version, docker, api-docker ]
    secrets: inherit
    with:
      artifact: true
      tag: "${{ needs.version.outputs.release_version }}"
