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ứ:

Yêu cầuMục đích
GitHub accountDùng để generate access token và sở hữu repository.
GitHub Access TokenImgHost 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

Bước 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. Sao chép và lưu token ngay sau khi tạo.

Thêm GitHub permissions

Bước 2: Điền GitHub Releases Channel trong ImgHost

Sau khi chọn GitHub Releases trong Cài đặt tải lên, điền các trường như sau:

Trường UINhậ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 đường dẫn đầy đủ như username/image.
Private repositoryBật hoặc tắt theo nhu cầu.
RemarkKhông bắt buộc, ví dụ Primary upload channel.

Điền cấu hình kênh GitHub

Bước 3: Save Channel

Sau khi điền trường, nhấn Save.

Hệ thống sẽ xử lý các chi tiết sau:

Hành vi hệ thốngMô tả
Tên repository ngắnImgHost xác định GitHub account hiện tại và mở rộng giá trị thành đường dẫn repository đầy đủ.
Full repository pathImgHost dùng path username/repository đúng như bạn nhập.
Kiểm tra repositoryNếu dùng đường dẫn personal account hiện tại, ImgHost tự tạo repository khi chưa tồn tại. Nếu nhập đường dẫn đầy đủ thủ công, ImgHost dùng path đó trực tiếp.
Public/private stateRepository visibility được sync theo switch hiện tại.

Danh sách kiểm tra nhanh

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

text
Sign in to GitHub
-> Create an Access Token
-> Return to ImgHost and enter the token and repository name
-> Save
-> If only a repo name is entered, ImgHost adds the current username automatically
-> If username/repo is entered, ImgHost uses it as-is
-> Upload a test image

Released as user documentation for ImgHost.