From 33b3d0f7324081a3a5c1f13269a9744acbde5574 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 2 Mar 2022 19:24:51 +0100 Subject: [PATCH 1/5] Fix problem with verify-range push in master See https://github.com/stellar/go/runs/5395864747?check_suite_focus=true --- .github/workflows/horizon.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/horizon.yml b/.github/workflows/horizon.yml index 339187e817..1ae2f1e27b 100644 --- a/.github/workflows/horizon.yml +++ b/.github/workflows/horizon.yml @@ -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 From a521826896bc923767401b905f49348b895cc20a Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 2 Mar 2022 19:50:42 +0100 Subject: [PATCH 2/5] Fix pull request refs --- .github/workflows/go.yml | 13 ++++++++----- .github/workflows/horizon.yml | 8 ++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cd3abe6d8b..8c5a913557 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.yml b/.github/workflows/horizon.yml index 1ae2f1e27b..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: | From 3f40a0de219c2a643d689472938f71f8e4b6f69e Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 2 Mar 2022 20:20:09 +0100 Subject: [PATCH 3/5] Bump all instances of actions/checkout to v3 --- .github/workflows/horizon-master.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 638e3ebf81dcf8480e233480a1b844d86db1aa9d Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 2 Mar 2022 20:25:24 +0100 Subject: [PATCH 4/5] Update .github/workflows/go.yml Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8c5a913557..c2bffe4e9c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -37,7 +37,7 @@ jobs: - 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 }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} - uses: ./.github/actions/setup-go with: go-version: ${{ matrix.go }} From 5193d67c993d4b9e69141f52672182c24f575825 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 2 Mar 2022 21:56:28 +0100 Subject: [PATCH 5/5] Update .github/workflows/go.yml Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c2bffe4e9c..20bff6301d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,7 +17,7 @@ jobs: - 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 }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} - uses: ./.github/actions/setup-go with: go-version: ${{ matrix.go }}