Skip to content

Commit

Permalink
test [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 6, 2025
1 parent 63e671a commit 065c9f0
Showing 1 changed file with 20 additions and 24 deletions.
44 changes: 20 additions & 24 deletions .github/workflows/create_rc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,33 @@ 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
outputs:
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
Expand Down

0 comments on commit 065c9f0

Please sign in to comment.