Skip to content

เพิ่ม GitHub Releases Channel

สิ่งที่ต้องเตรียมก่อนเริ่ม

ต้องใช้เพียงสามอย่าง:

RequirementPurpose
GitHub accountใช้ generate access token และเป็น owner ของ repository
GitHub Access TokenImgBed ใช้ access GitHub API, create releases และ upload files
Repository nameใส่เฉพาะ repository name ก็ได้ เช่น image

ขั้นตอนตั้งค่า

Step 1: Sign in เข้า GitHub และสร้าง Access Token

  1. Sign in เข้า GitHub
  2. คลิก avatar มุมขวาบนแล้วเปิด Settings
  3. เปิด Developer settings จาก left sidebar
  4. เปิด Personal access tokens
  5. เปิด Tokens (classic)
  6. คลิก Generate new token (classic)
  7. ตั้งชื่อ token ให้จำง่าย
  8. เลือก expiration date ตามแนวทาง maintenance ของคุณ
  9. เลือก scopes repo และ workflow
  10. Copy และ save token ทันทีหลังสร้างเสร็จ

Add GitHub permissions

Step 2: ใส่ GitHub Releases Channel ใน ImgBed

หลังเลือก GitHub Releases ใน Upload Settings ให้กรอก fields ดังนี้:

UI Fieldใส่อะไร
Channel nameชื่อที่คุณตั้งเอง เช่น GitHubPrimary
Access TokenGitHub Personal Access Token ที่เพิ่งสร้าง
Repository nameRepo name สั้น ๆ เช่น image หรือ full path เช่น username/image
Private repositoryเปิดหรือปิดตามความต้องการ
RemarkOptional เช่น Primary upload channel

Fill in the GitHub channel configuration

Step 3: Save Channel

กรอกครบแล้วคลิก Save

System จะจัดการรายละเอียดเหล่านี้:

System BehaviorDescription
Short repository nameImgBed ระบุ current GitHub account แล้วขยายค่าเป็น full repository path
Full repository pathImgBed ใช้ path username/repository ตามที่ใส่มาแบบตรงตัว
Repository checkถ้าใช้ current personal account path ImgBed จะสร้าง repository อัตโนมัติเมื่อยังไม่มี ถ้าใส่ full path เอง ImgBed จะใช้ path นั้นโดยตรง
Public/private stateRepository visibility จะ sync ตาม switch ปัจจุบัน

Quick Checklist

GitHub Releases ทำงานตาม flow นี้:

text
Sign in เข้า GitHub
-> สร้าง Access Token
-> กลับไป ImgBed แล้วใส่ token และ repository name
-> Save
-> ถ้าใส่แค่ repo name ImgBed จะเติม current username ให้อัตโนมัติ
-> ถ้าใส่ username/repo ImgBed จะใช้ตามนั้น
-> Upload test image

Released as user documentation for CloudFlare ImgBed.