| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Progress bars for markdown.
Have you ever wanted to track some progress in your markdown documents? Well, I do, and I used progressed.io before but it was shut down.
So I decided to recreate it.
Note
I'll try to keep this domain name up as much as possible, so wish me a long life 🙂
Tip
Every snippet below is ready to paste into GitHub Markdown.
Note
Note
Note
Note
Note
Note
Note
Note
Note
percentage can be an integer or float and is clamped to 0..100.
All color values must be 6-character hex values without # (example: ff9900). min and max must be provided together when used.
Headers for successful responses:
Tip
percentage values outside 0..100 are accepted and clamped automatically.
mise install
mise exec -- make setupRun locally:
mise exec -- make runTry it in a browser:
http://localhost:8080/progress/76
mise exec -- make test
mise exec -- make vet
mise exec -- make checkBASE_URL=https://geps.dev mise exec -- make smokeThe smoke test validates status codes, headers, and basic content contract.
Tip
If your BASE_URL already includes the function path (example: https://REGION-PROJECT.cloudfunctions.net/progress), keep PROGRESS_PATH empty.
If your BASE_URL already includes the function path (for example https://REGION-PROJECT.cloudfunctions.net/progress), set:
BASE_URL=https://REGION-PROJECT.cloudfunctions.net/progress PROGRESS_PATH="" mise exec -- make smokeSet your project first:
gcloud auth login
gcloud config set project THE_PROJECT_NAMEDeploy as an HTTP function with Progress as entrypoint:
gcloud functions deploy progress --gen2 --runtime go125 --entry-point Progress --trigger-http --allow-unauthenticated --region us-central1After deploy, run smoke tests:
BASE_URL=https://YOUR_DOMAIN_OR_FUNCTION_URL mise exec -- make smokeImportant
This endpoint is intentionally public (allUsers invoker) so it can be used directly from markdown image links across repos.
This repo includes .github/workflows/deploy.yml to deploy automatically on push to master (and manually via workflow_dispatch).
Required:
Optional (defaults are already set in workflow):
Create deployer service account:
gcloud iam service-accounts create github-deployer \
--display-name "GitHub deployer for markdown-progress"Grant deploy permissions on project:
PROJECT_ID=progress-markdown
PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format='value(projectNumber)')
SA="github-deployer@${PROJECT_ID}.iam.gserviceaccount.com"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA}" \
--role="roles/cloudfunctions.developer"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA}" \
--role="roles/run.admin"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA}" \
--role="roles/artifactregistry.writer"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA}" \
--role="roles/cloudbuild.builds.editor"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA}" \
--role="roles/iam.serviceAccountUser"Create Workload Identity Pool + Provider:
PROJECT_ID=progress-markdown
PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format='value(projectNumber)')
POOL_ID=github
PROVIDER_ID=github-oidc
gcloud iam workload-identity-pools create "$POOL_ID" \
--project="$PROJECT_ID" \
--location="global" \
--display-name="GitHub Actions Pool"
gcloud iam workload-identity-pools providers create-oidc "$PROVIDER_ID" \
--project="$PROJECT_ID" \
--location="global" \
--workload-identity-pool="$POOL_ID" \
--display-name="GitHub Actions Provider" \
--issuer-uri="https://token.actions.githubusercontent.com" \
--attribute-mapping="google.subject=assertion.sub,attribute.repository=assertion.repository,attribute.ref=assertion.ref"Allow only this repository to impersonate the deployer service account:
PROJECT_ID=progress-markdown
PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format='value(projectNumber)')
POOL_ID=github
REPO="gepser/markdown-progress"
SA="github-deployer@${PROJECT_ID}.iam.gserviceaccount.com"
gcloud iam service-accounts add-iam-policy-binding "$SA" \
--role="roles/iam.workloadIdentityUser" \
--member="principalSet://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/${POOL_ID}/attribute.repository/${REPO}"Provider resource name to set in GitHub variable:
projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID
See CONTRIBUTING.md.
| Back | FazBrowse Home | New Git URL |