Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/forgejo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

1. Forgejo に組織 `danything` を作る

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この PR で argocd-creds.yaml への url や README 内の他の参照(48 行目、58 行目)は doa に直していますが、ここ(46 行目)・25 行目・86 行目の見出し・112 行目の curl 例は danything のまま残っています。

組織は既に doa に改名済みなので、このまま残すと「先に 1 回だけ」の手順(46 行目)で誤って danything という組織を新規作成してしまったり、112 行目の curl をそのまま実行すると存在しない danything/<name> に当たって失敗したりします。要確認(意図的に古い手順として残しているのでなければ、他の箇所と合わせて doa に更新した方が良さそうです)。

2. ArgoCD 用のアクセストークンを作り(`read:repository` と `read:organization`)、Infisical `/argocd/forgejo-repo-creds` に
`url` = `https://fj.doany.io/danything` / `username` / `password` = トークン で入れる([argocd-creds.yaml](argocd-creds.yaml))。
`url` = `https://fj.doany.io/doa` / `username` / `password` = トークン で入れる([argocd-creds.yaml](argocd-creds.yaml))。
**スコープは repository・organization・issue の読み取り。** issue が無いと、非公開リポジトリができた時点で
ApplicationSet が `token does not have at least one of required scope(s): [read:issue]` で止まる(2026-09-15)
3. `bootstrap/argocd/repos.yaml` に Forgejo の generator を足す PR をマージする(**Forgejo とトークンが揃ってから**。
Expand All @@ -55,7 +55,7 @@

1. Forgejo の「新しい移行」で組織 `danything` の下に取り込む(Issue / PR / リリースも)。非公開のまま入り、チーム members が読める
2. ワークフローを Forgejo 向けに直す(`.github/workflows/` のままで読まれる)
- イメージは `ghcr.io/danything/<name>` → `fj.doany.io/danything/<name>`。push はワークフローの `secrets.GITHUB_TOKEN`(Forgejo のトークン)で通る
- イメージは `ghcr.io/danything/<name>` → `fj.doany.io/doa/<name>`。push はワークフローの `secrets.GITHUB_TOKEN`(Forgejo のトークン)で通る
- クラスタが pull できるように、アプリの namespace に `imagePullSecrets` を足す(Forgejo の `read:package` トークンを Infisical から `kubernetes.io/dockerconfigjson` で)
- claude-review(GitHub App)のワークフローは消す。Forgejo では動かない
3. Forgejo で CI とイメージの push が通るのを確かめる
Expand Down
4 changes: 2 additions & 2 deletions apps/forgejo/argocd-creds.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ArgoCD が Forgejo の danything/* を読むための資格情報(repo-creds)。
# ArgoCD が Forgejo の doa/* を読むための資格情報(repo-creds)。
# bootstrap/argocd/repos.yaml の gitea scmProvider の API スキャンにも同じトークンを使う。
#
# Infisical /argocd/forgejo-repo-creds に 3 つ:
# url https://fj.doany.io/danything
# url https://fj.doany.io/doa ← 組織名を変えたらここも直す(接頭辞で照合する)
# username トークンを作ったユーザー名
# password Forgejo のアクセストークン(read:repository と read:organization だけ)
#
Expand Down
8 changes: 6 additions & 2 deletions bootstrap/argocd/repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ spec:
revision: '{{ .branch }}'
files:
- path: deploy/argocd.yaml
# 同じ形で Forgejo(fj.doany.io)の danything も見る。**プライベートのリポジトリは GitHub に置かず
# 同じ形で Forgejo(fj.doany.io)の doa(2026-09-16 に danything から改名)も見る。
# **改名したら必ずここを直す。** 旧名のままだと Forgejo が 307 を返し、ArgoCD の
# git クライアントはリダイレクトを追わないので、対象のアプリが丸ごと Unknown で止まる。
# あわせて Infisical /argocd/forgejo-repo-creds の url も直すこと(repo-creds は URL の
# 接頭辞で照合するため、ずれると資格情報が付かない)。**プライベートのリポジトリは GitHub に置かず
# Forgejo にだけ置く**方針(2026-09-15。GitHub Actions の課金はプライベートにだけ掛かる)。
# Forgejo の API は Gitea と同じなので gitea の scmProvider で読める。
# 読むための資格情報は apps/forgejo/argocd-creds.yaml(Infisical から)。scan と clone の両方に使う。
Expand All @@ -54,7 +58,7 @@ spec:
- scmProvider:
cloneProtocol: https
gitea:
owner: danything
owner: doa
api: https://fj.doany.io/
allBranches: false
tokenRef:
Expand Down