From 01c8d25fc12432c5c79108ac85225fdc218cb007 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Fri, 16 Sep 2022 11:28:23 +0200 Subject: [PATCH] ci: update workflow tests --- .github/workflows/danger-workflow-tests.yml | 6 ++++++ .github/workflows/danger.yml | 7 ++++++- .github/workflows/updater-scripts-tests.yml | 2 +- .github/workflows/updater-workflow-tests.yml | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/danger-workflow-tests.yml b/.github/workflows/danger-workflow-tests.yml index 41a61c2..3630ccc 100644 --- a/.github/workflows/danger-workflow-tests.yml +++ b/.github/workflows/danger-workflow-tests.yml @@ -8,3 +8,9 @@ on: jobs: danger: uses: ./.github/workflows/danger.yml + + test-outputs: + runs-on: ubuntu-latest + needs: danger + steps: + - run: "[[ '${{ needs.danger.outputs.outcome }}' == 'success' ]]" \ No newline at end of file diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 8a1abe9..359e91f 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -1,6 +1,10 @@ # Runs DangerJS with a pre-configured set of rules on a Pull Request. on: - workflow_call + workflow_call: + outputs: + outcome: + description: Whether the Danger run finished successfully. Possible values are success, failure, cancelled, or skipped. + value: ${{ jobs.danger.steps.danger.outcome }} jobs: danger: @@ -15,6 +19,7 @@ jobs: # Using a pre-built docker image in GitHub container registry instaed of NPM to reduce possible attack vectors. - name: Run DangerJS + id: danger run: | docker run \ --volume ${{ github.workspace }}:/github/workspace \ diff --git a/.github/workflows/updater-scripts-tests.yml b/.github/workflows/updater-scripts-tests.yml index f3650b0..854751a 100644 --- a/.github/workflows/updater-scripts-tests.yml +++ b/.github/workflows/updater-scripts-tests.yml @@ -1,5 +1,5 @@ # This isn't a reusable workflow but an actual CI action for this repo itself - to test scripts. -name: Update Script Tests +name: Updater Script Tests on: push: diff --git a/.github/workflows/updater-workflow-tests.yml b/.github/workflows/updater-workflow-tests.yml index aa029d3..675a6a1 100644 --- a/.github/workflows/updater-workflow-tests.yml +++ b/.github/workflows/updater-workflow-tests.yml @@ -1,5 +1,5 @@ # This isn't a reusable workflow but an actual CI action for this repo itself - to test the workflows. -name: Update Workflow Tests +name: Updater Workflow Tests on: push: