Skip to content

Commit 09c557f

Browse files
remove polling for release workflow (#13)
1 parent 5c4edd3 commit 09c557f

File tree

3 files changed

+1
-59
lines changed

3 files changed

+1
-59
lines changed

publish-github-release/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
This GitHub Action automates the creation of a GitHub Release. It can generate release notes by fetching the details
44
directly from a Jira release version, or it can use release notes provided directly as an input.
5-
If not publishing a draft release, the action will wait for the release workflow to complete before reporting its
6-
status.
75

86
This action uses the GitHub CLI to create the release and a Python script to interact with the Jira API.
97

@@ -34,7 +32,6 @@ The following inputs can be configured for the action:
3432
| `jira_token` | Jira API token for authentication. Required if using `jira_release_name`. | `false` | |
3533
| `issue_types` | Optional comma-separated list of Jira issue types to include in the release notes, in order of appearance. | `false` | `''` |
3634
| `use_sandbox` | Set to `false` to use the Jira production server instead of the sandbox. | `false` | `true` |
37-
| `wait_for_workflow_name` | The name or file name of the workflow to wait for upon a non-draft release. If empty, this step is skipped. | `false` | `sonar-release` |
3835

3936
## Outputs
4037

publish-github-release/action.yml

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -129,58 +129,3 @@ runs:
129129
$DRAFT_FLAG)
130130
131131
echo "release_url=${RELEASE_URL}" >> $GITHUB_OUTPUT
132-
133-
- name: Wait for '${{ inputs.wait_for_workflow_name }}' Workflow
134-
if: inputs.draft == 'false' && inputs.wait_for_workflow_name != ''
135-
shell: bash
136-
run: |
137-
echo "${{ inputs.github_token }}" | gh auth login --with-token
138-
139-
echo "Waiting for the '${{ inputs.wait_for_workflow_name }}' workflow to be triggered by tag '${{ inputs.version }}'..."
140-
sleep 15
141-
142-
RUN_ID=""
143-
for i in {1..12}; do
144-
RUN_ID=$(gh run list --workflow="${{ inputs.wait_for_workflow_name }}" --event="release" --limit=5 --json databaseId,headBranch --jq '.[] | select(.headBranch == "${{ inputs.version }}") | .databaseId' | head -n 1)
145-
if [[ -n "${RUN_ID}" ]]; then
146-
echo "✅ Found workflow run with ID: ${RUN_ID} for tag '${{ inputs.version }}'."
147-
break
148-
fi
149-
echo "Run not found yet. Retrying in 10 seconds..."
150-
sleep 10
151-
done
152-
153-
if [[ -z "${RUN_ID}" ]]; then
154-
echo "::error::Could not find a triggered '${{ inputs.wait_for_workflow_name }}' workflow run for tag '${{ inputs.version }}' after 2 minutes."
155-
exit 1
156-
fi
157-
158-
echo "Polling status of run ${RUN_ID}..."
159-
# Timeout after 30 minutes
160-
TIMEOUT_POLL=$(( $(date +%s) + 1800 ))
161-
while true; do
162-
if [[ $(date +%s) -gt $TIMEOUT_POLL ]]; then
163-
echo "::error::Timeout of 30 minutes reached while waiting for workflow run ${RUN_ID} to complete."
164-
exit 1
165-
fi
166-
167-
RESULT=$(gh run view "${RUN_ID}" --json status,conclusion,url --jq '.status + "," + (.conclusion // "null") + "," + .url')
168-
STATUS=$(echo "$RESULT" | cut -d, -f1)
169-
CONCLUSION=$(echo "$RESULT" | cut -d, -f2)
170-
URL=$(echo "$RESULT" | cut -d, -f3)
171-
172-
if [[ "${STATUS}" == "completed" ]]; then
173-
echo "Workflow run has completed with conclusion: ${CONCLUSION}"
174-
if [[ "${CONCLUSION}" == "success" ]]; then
175-
echo "✅ '${{ inputs.wait_for_workflow_name }}' workflow completed successfully."
176-
echo "Run URL: ${URL}"
177-
exit 0
178-
else
179-
echo "::error::'${{ inputs.wait_for_workflow_name }}' workflow did not succeed. Final conclusion: ${CONCLUSION}."
180-
echo "Run URL: ${URL}"
181-
exit 1
182-
fi
183-
fi
184-
echo "Current status is '${STATUS}'. Waiting 30 seconds..."
185-
sleep 30
186-
done

update-analyzer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ found [here](https://github.com/SonarSource/re-terraform-aws-vault/pull/6693).
2929
| `base_branch` | The base branch for the pull request. | `false` | `master` |
3030
| `draft` | A boolean value (`true`/`false`) to control if the pull request is created as a draft. | `false` | `false` |
3131
| `reviewers` | A comma-separated list of GitHub usernames to request a review from (e.g., `user1,user2`). | `false` | |
32-
| `body` | The body of the pull request. | `false` | |
32+
| `pr_body` | The body of the pull request. | `false` | |
3333

3434
## Outputs
3535

0 commit comments

Comments
 (0)