diff --git a/.github/workflows/cicd-pipeline.yml b/.github/workflows/cicd-pipeline.yml index 3c157eb..b5334ad 100644 --- a/.github/workflows/cicd-pipeline.yml +++ b/.github/workflows/cicd-pipeline.yml @@ -38,12 +38,10 @@ on: jobs: test-code: #TODO: Use Coveralls? - runs-on: ubuntu-latest - steps: - - name: Run test for branch - uses: ./.github/workflows/test-code.yml - with: - ref: ${{inputs.ref}} + name: Run test for branch + uses: ./.github/workflows/test-code.yml + with: + ref: ${{inputs.ref}} build-image: runs-on: ubuntu-latest needs: test-code @@ -66,14 +64,10 @@ jobs: rebuild: ${{ inputs.rebuild }} test-image: - runs-on: ubuntu-latest - needs: build-image - steps: - - name: Run test for branch - uses: ./.github/workflows/test-image.yml - with: - ref: ${{inputs.ref}} - ghc_img: ${{ needs.build-image.outputs.ghc_img }} + uses: ./.github/workflows/test-image.yml + with: + ref: ${{inputs.ref}} + ghc_img: ${{ needs.build-image.outputs.ghc_img }} deploy: needs: [build-image, test-image] runs-on: ubuntu-latest diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 6cc758a..4416b26 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -14,6 +14,13 @@ on: ref: description: Revision or Branch to build default: main + workflow_call: + inputs: + ref: + description: Revision or Branch to build + default: main + required: true + type: string jobs: Test-Code: diff --git a/.github/workflows/test-image.yml b/.github/workflows/test-image.yml index c041393..e82e9db 100644 --- a/.github/workflows/test-image.yml +++ b/.github/workflows/test-image.yml @@ -17,6 +17,13 @@ on: ghc_img: description: The GHCR.io Image to test required: true + workflow_call: + inputs: + ref: + description: Revision or Branch to build + default: main + required: true + type: string jobs: Test-Code: runs-on: ubuntu-latest