From a0ab4d920c1af8abadca4d863ff8fa78b566f13b Mon Sep 17 00:00:00 2001 From: Gustavo Brunoro Date: Fri, 15 Nov 2024 13:37:08 -0300 Subject: [PATCH] fix: make sure we're in the correct branch --- .github/workflows/index-collection.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/index-collection.yaml b/.github/workflows/index-collection.yaml index 21383639..984b0ed2 100644 --- a/.github/workflows/index-collection.yaml +++ b/.github/workflows/index-collection.yaml @@ -16,9 +16,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Make sure the indexer is on the latest commit + - name: Make sure the indexer is on the latest ref of the PR branch run: | git fetch origin ${{ github.event.pull_request.head.ref }}:${{ github.event.pull_request.head.ref }} + git checkout ${{ github.event.pull_request.head.ref }} - name: Skip if current commit is from the indexer run: | git log -1 --pretty=format:%ae ${{ github.event.after }} | grep -q "indexer@cadern.in" @@ -26,6 +27,7 @@ jobs: echo "Last commit was from the indexer, skipping" exit 78 fi + exit 0 - name: Get apt dependencies uses: awalsh128/cache-apt-pkgs-action@latest with: