Skip to content

refactor(ci): use curl + retries for website build webhook#266

Open
Sriniketh24 wants to merge 1 commit intohttpie:masterfrom
Sriniketh24:Open-source-Contribution
Open

refactor(ci): use curl + retries for website build webhook#266
Sriniketh24 wants to merge 1 commit intohttpie:masterfrom
Sriniketh24:Open-source-Contribution

Conversation

@Sriniketh24
Copy link

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 Testing

YAML 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant