From bac692f50870b3ede3a152a5b741d1eb22a7df0e Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Fri, 16 Feb 2024 00:19:43 +0100 Subject: [PATCH] CI: Fix the no such file or directory error with the working directory. Fix the error with the working directory in the result job in some GitHub Actions YAML files. I hit this error on my forked repository below. https://github.com/junaruga/ruby/actions/runs/7921897724/job/21628462038?pr=2#step:2:11 ``` Error: An error occurred trying to start process '/bin/bash' with working directory '/Users/runner/work/ruby/ruby/build'. No such file or directory ``` --- .github/workflows/macos.yml | 1 + .github/workflows/ubuntu.yml | 1 + .github/workflows/yjit-macos.yml | 1 + .github/workflows/yjit-ubuntu.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9449e136ddd104..52ba66dd0fecd6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -105,6 +105,7 @@ jobs: needs: [make] steps: - run: exit 1 + working-directory: if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} defaults: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2a9c7551465ad9..7999965f04db31 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -123,6 +123,7 @@ jobs: needs: [make] steps: - run: exit 1 + working-directory: if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} defaults: diff --git a/.github/workflows/yjit-macos.yml b/.github/workflows/yjit-macos.yml index 3c9b94e1baaf1a..6413e6b5ee5c01 100644 --- a/.github/workflows/yjit-macos.yml +++ b/.github/workflows/yjit-macos.yml @@ -138,6 +138,7 @@ jobs: needs: [make] steps: - run: exit 1 + working-directory: if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} defaults: diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml index 6354c390843608..207089d86a79f5 100644 --- a/.github/workflows/yjit-ubuntu.yml +++ b/.github/workflows/yjit-ubuntu.yml @@ -194,6 +194,7 @@ jobs: needs: [make] steps: - run: exit 1 + working-directory: if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} defaults: