diff --git a/.github/workflows/build-and-run-tests-from-branch.yml b/.github/workflows/build-and-run-tests-from-branch.yml index 0fd9ef84d4..e412101f93 100644 --- a/.github/workflows/build-and-run-tests-from-branch.yml +++ b/.github/workflows/build-and-run-tests-from-branch.yml @@ -128,9 +128,6 @@ jobs: git config --global --add safe.directory ${GITHUB_WORKSPACE} git fetch git checkout ${{ github.event.inputs.commit_sha }} - - uses: actions/checkout@v3 - with: - ref: ${{ env.COMMIT_SHA }} - name: Run monitoring run: | diff --git a/.github/workflows/publish-on-github-packages.yml b/.github/workflows/publish-on-github-packages.yml index 761d4221f9..69fd73e0bc 100644 --- a/.github/workflows/publish-on-github-packages.yml +++ b/.github/workflows/publish-on-github-packages.yml @@ -27,9 +27,15 @@ jobs: - name: Print environment variables run: printenv - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.inputs.commit_sha }} + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Check out ${{ github.event.inputs.commit_sha }} commit + if: github.event.inputs.commit_sha != '' + run: | + git config --global --add safe.directory ${GITHUB_WORKSPACE} + git fetch + git checkout ${{ github.event.inputs.commit_sha }} - uses: gradle/gradle-build-action@v2 with: