Skip to content

github-syncの使用を止めて、手動でリポジトリを同期するように変更 - #3681

Merged
KenichiroTanaka merged 10 commits into
pgsql-jp:doc_ja_18from
noborus:change-reposync
Jun 13, 2026
Merged

github-syncの使用を止めて、手動でリポジトリを同期するように変更#3681
KenichiroTanaka merged 10 commits into
pgsql-jp:doc_ja_18from
noborus:change-reposync

Conversation

@noborus

@noborus noborus commented Jun 9, 2026

Copy link
Copy Markdown
Member

No description provided.

@noborus

noborus commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

元ブランチを同期するようにしていたgithub actionsの repo-sync/github-sync@v2 がエラーになるようになっていたため、
スクリプトで同期するように変更しました。

エラーになった原因は、 postgresのmasterブランチに.github/workflows/pg-ci.yml が追加されたため、このファイルを同期しようとして、権限エラーになっていたためです。

このようなファイル除外が repo-sync/github-sync@v2 で出来なかったのと、すでにアーカイブになっていて古くなっていたたため、
github actions内にスクリプトを書いて実行する方式に変更しました。

これにより.github/workflows/pg-ci.ymlが除外されています。
ここでは本家のテストが走る必要がないためです。

@noborus
noborus requested a review from KenichiroTanaka June 9, 2026 02:45

@KenichiroTanaka KenichiroTanaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

すみません、1箇所、処理内容が理解できず、教えていただけないでしょうか。

Comment thread .github/workflows/repo-sync.yml Outdated
git merge --no-edit "upstream/$branch" || true

if [ -d .github/workflows ]; then
git restore --source=HEAD --staged --worktree .github/workflows || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

すみません、52,53,54行目の処理が何を目的としているのか理解できませんでした。
HEADからworkflowsを戻す必要がある?
理解が追いつかず、教えていただいてもいいでしょうか。

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ありがとうございます。
基本的には .github/workflows内の衝突は起こらないはずですが、起こった場合にも元に戻すようにと思ったのですが、
実際にはうまくいっておらず、これで元のmasterでpushしても権限不足ではじかれてしまいました。

そのため、同期するブランチでは.github/workflowsをrm -rfしてコミットするように修正しました。

https://github.com/noborus/jpug-doc/actions/runs/27261159688/job/80506948211
で試しました。

@KenichiroTanaka KenichiroTanaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

対応ありがとうございます。
承知しました。一通り確認しましたのでマージします。

@KenichiroTanaka
KenichiroTanaka merged commit b4b2e81 into pgsql-jp:doc_ja_18 Jun 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants