diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cd3abe6d8b..20bff6301d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,7 +14,10 @@ jobs: go: [1.17, 1.18.0-rc1] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + # For pull requests, build and test the PR head not a merge of the PR with the destination. + ref: ${{ github.event.pull_request.head.sha || github.ref }} - uses: ./.github/actions/setup-go with: go-version: ${{ matrix.go }} @@ -31,10 +34,10 @@ jobs: go: [1.17, 1.16.7, 1.18.0-rc1] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # For pull requests, build and test the PR head not a merge of the PR with the destination. - ref: ${{ github.head_ref || github.ref }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} - uses: ./.github/actions/setup-go with: go-version: ${{ matrix.go }} @@ -79,10 +82,10 @@ jobs: REDIS_HOST: localhost REDIS_PORT: 6379 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # For pull requests, build and test the PR head not a merge of the PR with the destination. - ref: ${{ github.head_ref || github.ref }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} # We need to full history for git-restore-mtime to know what modification dates to use. # Otherwise, the Go test cache will fail (due to the modification time of fixtures changing). fetch-depth: '0' diff --git a/.github/workflows/horizon-master.yml b/.github/workflows/horizon-master.yml index dcad2825f8..cdbe1a2763 100644 --- a/.github/workflows/horizon-master.yml +++ b/.github/workflows/horizon-master.yml @@ -10,7 +10,7 @@ jobs: name: Push stellar/horizon:sha to DockerHub runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get image tag (short sha) shell: bash @@ -35,7 +35,7 @@ jobs: name: Push stellar/ledger-state-diff:{sha,latest} to DockerHub runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Login to DockerHub uses: docker/login-action@bb984efc561711aaa26e433c32c3521176eae55b diff --git a/.github/workflows/horizon.yml b/.github/workflows/horizon.yml index 339187e817..b4a08acf4d 100644 --- a/.github/workflows/horizon.yml +++ b/.github/workflows/horizon.yml @@ -39,10 +39,10 @@ jobs: PGPASSWORD: postgres PGDATABASE: postgres steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # For pull requests, build and test the PR head not a merge of the PR with the destination. - ref: ${{ github.head_ref || github.ref }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} # We need to full history for git-restore-mtime to know what modification dates to use. # Otherwise, the Go test cache will fail (due to the modification time of fixtures changing). fetch-depth: '0' @@ -74,10 +74,10 @@ jobs: name: Test (and push) verify-range image runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # For pull requests, build and test the PR head not a merge of the PR with the destination. - ref: ${{ github.head_ref || github.ref }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Build and test the Verify Range Docker image run: | @@ -92,8 +92,8 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - if: github.ref == 'refs/heads/master' - name: Push to DockerHub - # TODO(fons): Commented out until we disable the CircleCI jobs - run: \# docker push stellar/horizon-verify-range:latest + # TODO(fons): Commented out until we disable the CircleCI jobs + # - if: github.ref == 'refs/heads/master' + # name: Push to DockerHub + # run: docker push stellar/horizon-verify-range:latest