Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove fpm PR -> bottles automation #64

Merged
merged 1 commit into from
Mar 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions .github/workflows/fpm-version-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,67 +95,3 @@ jobs:
automated-pr
version-bump

- name: Trigger brew test-bot
if: env.UPDATE_NEEDED == 'true' && steps.create-pr.outputs.pull-request-number
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'tests.yml',
ref: 'main',
inputs: {
head_sha: '${{ steps.create-pr.outputs.pull-request-head-sha }}'
}
});

# Wait for test-bot CI to complete
- name: Wait for test-bot to complete
if: env.UPDATE_NEEDED == 'true' && steps.create-pr.outputs.pull-request-number
run: |
echo "Waiting for test-bot workflow to complete..."
timeout=1800 # 30 minutes in seconds
interval=60 # Check every minute
elapsed=0

while [ $elapsed -lt $timeout ]; do
STATUS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs?status=completed&event=pull_request&head_sha=$(git rev-parse HEAD)")

COMPLETED=$(echo "$STATUS" | jq -r '.workflow_runs[] | select(.name == "brew test-bot") | .status')

if [ "$COMPLETED" = "completed" ]; then
CONCLUSION=$(echo "$STATUS" | jq -r '.workflow_runs[] | select(.name == "brew test-bot") | .conclusion')
if [ "$CONCLUSION" = "success" ]; then
echo "test-bot workflow completed successfully!"
break
elif [ "$CONCLUSION" = "failure" ]; then
echo "test-bot workflow failed!"
exit 1
fi
fi

sleep $interval
elapsed=$((elapsed + interval))
echo "Still waiting... ($elapsed seconds elapsed)"
done

if [ $elapsed -ge $timeout ]; then
echo "Timeout waiting for test-bot workflow to complete"
exit 1
fi

- name: Add pr-pull label
if: env.UPDATE_NEEDED == 'true' && steps.create-pr.outputs.pull-request-number
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ steps.create-pr.outputs.pull-request-number }},
labels: ['pr-pull']
})
Loading