diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index 8530c3d23..364585904 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -13,9 +13,13 @@ jobs: build-push-container: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 with: - fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147 + # Pull the gitsha of the PR, and don't merge changes from main automatically. + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147 + fetch-depth: "0" - name: install ignite run: make ignite_install