From 065c9f0cc94563e33e972e791b1625ae14443968 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:58:48 -0500 Subject: [PATCH] test [skip ci] --- .github/workflows/create_rc_pr.yml | 44 ++++++++++++++---------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/create_rc_pr.yml b/.github/workflows/create_rc_pr.yml index 5859418fe01161..b14c584960a902 100644 --- a/.github/workflows/create_rc_pr.yml +++ b/.github/workflows/create_rc_pr.yml @@ -15,30 +15,6 @@ env: permissions: {} jobs: - agent6_check: - runs-on: ubuntu-latest - steps: - - name: Check if agent 6 rc PR already exists - id: a6_error - if: ${{ env.IS_AGENT6_RELEASE == 'true' }} - run: | - prs=$(gh pr list \ - --repo "$GITHUB_REPOSITORY" \ - --base "$AGENT6_RELEASE_BRANCH" \ - --json url,title \ - --search "Update release.json and Go modules for in:title") - - if [ "$(echo "$prs" | jq 'length')" -gt 0 ]; then - pr_list=$(echo "$prs" | jq -r '.[] | "- \(.title): \(.url)"') - error_message="AGENT 6 ERROR: The following Agent 6 release candidate PRs already exist. Please merge and build them before creating a new one:\n$pr_list" - curl -X POST -H 'Content-Type: application/json' \ - --data "{ 'channel_id': 'C085P12CTFX', 'message': '$error_message' }" \ - ${{ secrets.SLACK_DATADOG_AGENT_CI_WEBHOOK }} - fi - - echo "$error_message" - exit 1 - find_release_branches: runs-on: ubuntu-latest needs: agent6_check @@ -46,6 +22,26 @@ jobs: branches: ${{ steps.branches.outputs.value }} warning: ${{ steps.warning.outputs.value }} steps: + - name: Check if agent 6 rc PR already exists + id: a6_error + if: ${{ env.IS_AGENT6_RELEASE == 'true' }} + run: | + prs=$(gh pr list \ + --repo "$GITHUB_REPOSITORY" \ + --base "$AGENT6_RELEASE_BRANCH" \ + --json url,title \ + --search "Update release.json and Go modules for in:title") + + if [ "$(echo "$prs" | jq 'length')" -gt 0 ]; then + pr_list=$(echo "$prs" | jq -r '.[] | "- \(.title): \(.url)"') + error_message="AGENT 6 ERROR: The following Agent 6 release candidate PRs already exist. Please merge and build them before creating a new one:\n$pr_list" + curl -X POST -H 'Content-Type: application/json' \ + --data "{ 'channel_id': 'C085P12CTFX', 'message': '$error_message' }" \ + ${{ secrets.SLACK_DATADOG_AGENT_CI_WEBHOOK }} + fi + + echo "$error_message" + exit 1 - name: Checkout repository if: ${{ env.IS_AGENT6_RELEASE == 'false' }} uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4