From 71fc8fa7be857fd5500d495c6dc4f2fb52510392 Mon Sep 17 00:00:00 2001 From: Elias Segundo Antonio Date: Fri, 9 Sep 2022 11:43:15 -0500 Subject: [PATCH 1/4] Updated go_tests Workflow (#170) Co-authored-by: Elias Segundo --- .github/workflows/go_tests.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index 8ee8110ad417..cc670d40ddce 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -24,24 +24,21 @@ on: - cron: '10 2 * * *' push: branches: ['master', 'release-*'] - tags: 'v*' - pull_request: + tags: ['v*'] + pull_request_target: branches: ['master', 'release-*'] - tags: 'v*' + tags: ['v*'] paths: ['sdks/go/pkg/**', 'sdks/go.mod', 'sdks/go.sum'] - -# This allows a subsequently queued workflow run to interrupt previous runs -concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' - cancel-in-progress: true - +permissions: read-all jobs: build: - runs-on: ubuntu-latest + runs-on: [self-hosted, ubuntu-20.04] + name: Go Build steps: - - uses: actions/checkout@v3 + - name: Check out code + uses: actions/checkout@v3 with: - fetch-depth: 2 + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-go@v3 with: go-version: '1.18' @@ -74,4 +71,4 @@ jobs: echo -e "Please address Staticcheck warnings before checking in changes\n" echo -e "Staticcheck Warnings:\n" echo -e "$RESULTS" && exit 1 - fi \ No newline at end of file + fi From 3d35a8a6291f5473889905aff31c2e79c835ea43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniela=20Mart=C3=ADn?= Date: Fri, 9 Sep 2022 11:44:00 -0500 Subject: [PATCH 2/4] Added master changes in go_tests to avoid merge conflicts --- .github/workflows/go_tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index cc670d40ddce..f352ed5bea62 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -30,6 +30,10 @@ on: tags: ['v*'] paths: ['sdks/go/pkg/**', 'sdks/go.mod', 'sdks/go.sum'] permissions: read-all +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true jobs: build: runs-on: [self-hosted, ubuntu-20.04] From b53efd24d36296d5386cd5c25e81f2f886ea1af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniela=20Mart=C3=ADn?= Date: Fri, 9 Sep 2022 11:54:05 -0500 Subject: [PATCH 3/4] Re adding the fetch-depth: 2 in checkout step in Go Test workflow --- .github/workflows/go_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index f352ed5bea62..d58b37afaaf6 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -42,6 +42,7 @@ jobs: - name: Check out code uses: actions/checkout@v3 with: + fetch-depth: 2 ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-go@v3 with: From 304bddb3a35b333f90dac60daeb902a47ba98cc4 Mon Sep 17 00:00:00 2001 From: elink22 <103056145+elink22@users.noreply.github.com> Date: Thu, 24 Nov 2022 10:51:15 -0600 Subject: [PATCH 4/4] Switching trigger to pull_request (#262) * Switching trigger to pull_request * Removing ref from checkout --- .github/workflows/go_tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index d58b37afaaf6..6a5ab4450b1e 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -25,11 +25,10 @@ on: push: branches: ['master', 'release-*'] tags: ['v*'] - pull_request_target: + pull_request: branches: ['master', 'release-*'] tags: ['v*'] paths: ['sdks/go/pkg/**', 'sdks/go.mod', 'sdks/go.sum'] -permissions: read-all # This allows a subsequently queued workflow run to interrupt previous runs concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' @@ -43,7 +42,6 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 2 - ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-go@v3 with: go-version: '1.18'