From 6cf320e9b593e93d67fa6eb598828ad4a4759955 Mon Sep 17 00:00:00 2001 From: SnowCait Date: Fri, 12 Aug 2022 07:58:11 +0900 Subject: [PATCH 1/3] Detect paths and package failure --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4d5922..9e45c7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: # Required status checks passing: - needs: [ test ] + needs: [ paths, package, test ] if: always() runs-on: ubuntu-22.04 timeout-minutes: 5 From f657e8e46b4cdb0a3b4acf1a84057b49ac1d71d9 Mon Sep 17 00:00:00 2001 From: SnowCait Date: Fri, 12 Aug 2022 08:00:38 +0900 Subject: [PATCH 2/3] Checkout is required on push event --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e45c7f..8b63f66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: steps: - run: cat $GITHUB_EVENT_PATH + - uses: actions/checkout@v3 + if: github.event_name == 'push' - uses: dorny/paths-filter@v2.10.2 id: changes with: From e7b2987aa10a6556cd204a006d5c00d7681b96ea Mon Sep 17 00:00:00 2001 From: SnowCait Date: Fri, 12 Aug 2022 08:04:01 +0900 Subject: [PATCH 3/3] Fix paths workflow --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b63f66..dce1535 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,6 @@ jobs: timeout-minutes: 5 outputs: package: ${{ steps.changes.outputs.package }} - test: ${{ steps.changes.outputs.test }} steps: - run: cat $GITHUB_EVENT_PATH @@ -22,13 +21,11 @@ jobs: with: filters: | package: - - .github/workflows/package.yml + - .github/workflows/ci.yml - dist/** - src/** - package-lock.json - package.json - test: - - .github/workflows/test.yml package: needs: [ paths ] @@ -73,7 +70,7 @@ jobs: if: >- failure() == false && cancelled() == false && - (needs.paths.outputs.package == 'true' || needs.paths.outputs.test == 'true') + needs.paths.outputs.package == 'true' runs-on: ${{ matrix.os }} strategy: matrix: