refactor(ci): use curl + retries for website build webhook#266
Open
Sriniketh24 wants to merge 1 commit intohttpie:masterfrom
Open
refactor(ci): use curl + retries for website build webhook#266Sriniketh24 wants to merge 1 commit intohttpie:masterfrom
Sriniketh24 wants to merge 1 commit intohttpie:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the GitHub Actions workflow that triggers the HTTPie Desktop website rebuild on release events. The goal is to remove a fragile dependency and make the workflow more reliable and maintainable.
Problem
The existing workflow relied on installing HTTPie using:
snap install --edge httpie
This introduced multiple issues:
unnecessary external dependency
possible snap availability failures on runners
edge channel instability
difficult to read single-line script
no failure handling or retries
If the webhook failed once, the website build would silently not run.
Changes Made
The workflow was rewritten to:
Replace HTTPie CLI with curl -fsS -X POST
Add strict shell safety: set -euo pipefail
Add missing secret validation
Add retry logic (3 attempts with delay)
Add least privilege permissions: contents: read
Add timeout-minutes: 5 to prevent stuck workflows
Improve readability and maintainability
Before | After -- | -- snap install dependency | uses built-in curl single attempt | retries with backoff no error handling | strict mode + secret check hard to read | structured YAML no timeout | controlled execution time TestingYAML validated locally using Python YAML parser
Logic verified locally (retry + secret guard)
GitHub Actions will execute and validate on release events
Impact
This improves CI reliability and reduces external dependencies while keeping the same functionality.