diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 80f9f86..e61771d 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -125,3 +125,13 @@ jobs: if: steps.cache-deps.outputs.cache-hit != 'true' - run: poetry run pytest + + results: + name: Analysis Results + needs: [trivy, java, python] + if: always() + runs-on: ubuntu-22.04 + steps: + - if: contains(needs.*.result, 'failure') + run: echo "At least one job has failed." && exit 1 + - run: echo "Success!" diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 3183352..f14239c 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -10,8 +10,6 @@ concurrency: cancel-in-progress: true jobs: - - # https://github.com/bcgov-nr/action-builder-ghcr builds: name: Builds @@ -57,13 +55,13 @@ jobs: build_outputs: ${{ needs.builds.outputs.digest }} tag: ${{ github.event.number }} release: ${{ github.event.number }} - validate: - name: Validate - needs: [deploys] - if: always() && (!cancelled()) && (!failure()) - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@v0.7.0 - with: - markdown_links: | - - [Java](https://${{ github.event.repository.name }}-${{ github.event.number }}-backendJava.apps.silver.devops.gov.bc.ca) - - [Py](https://${{ github.event.repository.name }}-${{ github.event.number }}-backendPy.apps.silver.devops.gov.bc.ca) - - [Go](https://${{ github.event.repository.name }}-${{ github.event.number }}-backendGo.apps.silver.devops.gov.bc.ca) + + results: + name: PR Results + needs: [builds, deploys] + if: always() + runs-on: ubuntu-22.04 + steps: + - if: contains(needs.*.result, 'failure') + run: echo "At least one job has failed." && exit 1 + - run: echo "Success!" diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index d0cd28e..be4a86f 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -2,7 +2,7 @@ name: PR Validate on: pull_request: - types: [edited] + types: [edited, opened, synchronize, reopened, ready_for_review] concurrency: group: ${{ github.workflow }}-edit-${{ github.event.number }} @@ -17,3 +17,11 @@ jobs: - [Java](https://${{ github.event.repository.name }}-${{ github.event.number }}-backendJava.apps.silver.devops.gov.bc.ca) - [Py](https://${{ github.event.repository.name }}-${{ github.event.number }}-backendPy.apps.silver.devops.gov.bc.ca) - [Go](https://${{ github.event.repository.name }}-${{ github.event.number }}-backendGo.apps.silver.devops.gov.bc.ca) + + results: + name: Validate Results + if: always() + needs: [validate] + runs-on: ubuntu-22.04 + steps: + - run: echo "Success!"