Skip to content

Thêm GitHub Releases Channel

Cần chuẩn bị gì trước khi bắt đầu

Bạn chỉ cần ba thứ:

RequirementPurpose
GitHub accountDùng để generate access token và sở hữu repository.
GitHub Access TokenImgBed dùng để access GitHub API, tạo releases và upload files.
Repository nameCó thể chỉ nhập repository name, ví dụ image.

Các bước thiết lập

Step 1: Sign in vào GitHub và tạo Access Token

  1. Sign in vào GitHub.
  2. Nhấn avatar ở góc trên bên phải và mở Settings.
  3. Mở Developer settings từ left sidebar.
  4. Mở Personal access tokens.
  5. Mở Tokens (classic).
  6. Nhấn Generate new token (classic).
  7. Đặt tên token dễ nhận biết.
  8. Chọn expiration date theo cách bạn muốn bảo trì.
  9. Chọn scopes repoworkflow.
  10. Copy và lưu token ngay sau khi tạo.

Add GitHub permissions

Step 2: Điền GitHub Releases Channel trong ImgBed

Sau khi chọn GitHub Releases trong Upload Settings, điền các field như sau:

UI FieldNhập gì
Channel nameTên bạn chọn, ví dụ GitHubPrimary.
Access TokenGitHub Personal Access Token vừa tạo.
Repository nameRepo name ngắn như image, hoặc full path như username/image.
Private repositoryBật hoặc tắt theo nhu cầu.
RemarkOptional, ví dụ Primary upload channel.

Fill in the GitHub channel configuration

Step 3: Save Channel

Sau khi điền fields, nhấn Save.

System sẽ xử lý các chi tiết sau:

System BehaviorDescription
Short repository nameImgBed xác định current GitHub account và mở rộng value thành full repository path.
Full repository pathImgBed dùng path username/repository đúng như bạn nhập.
Repository checkNếu dùng current personal account path, ImgBed tự tạo repository khi chưa tồn tại. Nếu nhập full path thủ công, ImgBed dùng path đó trực tiếp.
Public/private stateRepository visibility được sync theo switch hiện tại.

Quick Checklist

GitHub Releases hoạt động theo flow này:

text
Sign in vào GitHub
-> Tạo Access Token
-> Quay lại ImgBed và nhập token cùng repository name
-> Save
-> Nếu chỉ nhập repo name, ImgBed tự thêm current username
-> Nếu nhập username/repo, ImgBed dùng nguyên giá trị đó
-> Upload test image

Released as user documentation for CloudFlare ImgBed.