From c729508e69530e1346212c4029eddc787e999fe9 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Tue, 5 Mar 2024 15:44:07 -0500 Subject: [PATCH 1/7] ci: fix verify-release.yml fetch-depth --- .github/workflows/verify-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index 27907b017..dfbba8afc 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -2,6 +2,7 @@ name: Verify Release on: workflow_dispatch: + pull_request: push: branches: - release @@ -13,7 +14,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + # ref: ${{ github.ref }} + ref: release + fetch-depth: 0 - name: Setup Go uses: actions/setup-go@v4 From 83831a136cffcd163e3578242f4a95bfdd519fa8 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Tue, 5 Mar 2024 15:53:30 -0500 Subject: [PATCH 2/7] ci: fetch main then checkout release --- .github/workflows/verify-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index dfbba8afc..f8e26a18f 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -14,8 +14,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - # ref: ${{ github.ref }} - ref: release + ref: main fetch-depth: 0 - name: Setup Go @@ -25,6 +24,7 @@ jobs: - name: Verify release run: | + git checkout release scripts/release.sh verify - name: Notify Slack on Failure From ad40cff1b805fda9882796addb6c9a8d6b350b90 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Tue, 5 Mar 2024 20:22:10 -0500 Subject: [PATCH 3/7] ci: update --- .github/workflows/verify-release.yml | 49 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index f8e26a18f..3eeb35bb3 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -25,29 +25,30 @@ jobs: - name: Verify release run: | git checkout release + git pull scripts/release.sh verify - - name: Notify Slack on Failure - uses: slackapi/slack-github-action@v1.25.0 - if: failure() - with: - payload: | - { - "attachments": [ - { - "color": "#E92020", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/verify-release\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}" - } - } - ] - } - ] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + # - name: Notify Slack on Failure + # uses: slackapi/slack-github-action@v1.25.0 + # if: failure() + # with: + # payload: | + # { + # "attachments": [ + # { + # "color": "#E92020", + # "blocks": [ + # { + # "type": "section", + # "text": { + # "type": "mrkdwn", + # "text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/verify-release\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}" + # } + # } + # ] + # } + # ] + # } + # env: + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }} + # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From 4026299fd55fb356a1a8904e939047dea3f111ab Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Tue, 5 Mar 2024 20:30:39 -0500 Subject: [PATCH 4/7] ci: update --- .github/workflows/verify-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index 3eeb35bb3..faf3f3216 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: main + ref: refs/remotes/origin/release fetch-depth: 0 - name: Setup Go @@ -24,10 +24,10 @@ jobs: - name: Verify release run: | - git checkout release - git pull scripts/release.sh verify + # git checkout release + # git pull # - name: Notify Slack on Failure # uses: slackapi/slack-github-action@v1.25.0 # if: failure() From 4fc81208dc286c3c360a5221a22622746c478ff9 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 6 Mar 2024 09:55:04 -0500 Subject: [PATCH 5/7] ci: update --- .github/workflows/verify-release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index faf3f3216..874463c74 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -14,13 +14,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: refs/remotes/origin/release + ref: release fetch-depth: 0 - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: 1.21.x + # - name: Setup Go + # uses: actions/setup-go@v4 + # with: + # go-version: 1.21.x - name: Verify release run: | From 2cb51a11d84f2db230ee4a9e4775cac8e5a54c1d Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 6 Mar 2024 09:59:50 -0500 Subject: [PATCH 6/7] ci: update --- .github/workflows/verify-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index 874463c74..d012a9b88 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -24,6 +24,7 @@ jobs: - name: Verify release run: | + git remote set-head origin main scripts/release.sh verify # git checkout release From edb2c4f49de335456b2e9789308ee50c75f11fae Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 6 Mar 2024 10:36:04 -0500 Subject: [PATCH 7/7] ci: explicitly set HEAD to main --- .github/workflows/verify-release.yml | 56 ++++++++++++---------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index d012a9b88..59611f77c 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -2,7 +2,6 @@ name: Verify Release on: workflow_dispatch: - pull_request: push: branches: - release @@ -17,39 +16,32 @@ jobs: ref: release fetch-depth: 0 - # - name: Setup Go - # uses: actions/setup-go@v4 - # with: - # go-version: 1.21.x - - name: Verify release run: | git remote set-head origin main scripts/release.sh verify - # git checkout release - # git pull - # - name: Notify Slack on Failure - # uses: slackapi/slack-github-action@v1.25.0 - # if: failure() - # with: - # payload: | - # { - # "attachments": [ - # { - # "color": "#E92020", - # "blocks": [ - # { - # "type": "section", - # "text": { - # "type": "mrkdwn", - # "text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/verify-release\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}" - # } - # } - # ] - # } - # ] - # } - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }} - # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + - name: Notify Slack on Failure + uses: slackapi/slack-github-action@v1.25.0 + if: failure() + with: + payload: | + { + "attachments": [ + { + "color": "#E92020", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/verify-release\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}" + } + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK