diff --git a/.github/workflows/pr_2.yaml b/.github/workflows/pr_2.yaml index ad47221..f1d45dc 100644 --- a/.github/workflows/pr_2.yaml +++ b/.github/workflows/pr_2.yaml @@ -13,7 +13,7 @@ on: jobs: # This workflow contains a single job called "build" build: - if: startsWith(github.head_ref, 'trunk-merge/') + if: startsWith(github.head_ref, 'trunk-merge/') # The type of runner that the job will run on runs-on: ubuntu-latest @@ -24,5 +24,12 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - name: Run Tests - run: ./sleep.sh + - name: Possibly fail + id: possibly_fail + uses: andstor/file-existence-action@v1 + with: + files: workspace/target_2/another-added-file.txt + + - name: Fail + if: steps.possibly_fail.outputs.files_exists == 'true' + run: exit 1 diff --git a/workspace/target_2/another-added-file.txt b/workspace/target_2/another-added-file.txt new file mode 100644 index 0000000..1ac1e44 --- /dev/null +++ b/workspace/target_2/another-added-file.txt @@ -0,0 +1 @@ +More text! \ No newline at end of file