From 94845e2e3f679ab2504702e749bb6d91be821c9d Mon Sep 17 00:00:00 2001 From: Alexander Zautke Date: Mon, 30 Dec 2024 12:34:14 +0300 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9e2782..d12a4e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code (PR) + uses: actions/checkout@v4 + if: github.event_name == 'pull_request' + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Checkout code (Main) + uses: actions/checkout@v4 + if: github.event_name != 'pull_request' # Java and .NET are already installed on ubuntu-latest @@ -43,8 +50,7 @@ jobs: SUSHI_OPTIONS: Resources/ EXPECTED_FAILS: VALIDATION_CONFORMANCE_DOTNET VALIDATION_CONFORMANCE_JAVA VALIDATION_EXAMPLES_JAVA - # disabled to not rewrite local testes ressources - # - name: Add & Commit - # uses: EndBug/add-and-commit@v7 - # with: - # add: 'Resources/fsh-generated/resources/' + - name: Add & Commit + uses: EndBug/add-and-commit@v9 + with: + add: 'Resources/fsh-generated/resources/'