From 4a5daf316eed20c92ba5e4df6786f98655dbbc37 Mon Sep 17 00:00:00 2001 From: Kenichiro Goto Date: Thu, 26 Nov 2026 16:10:41 +0900 Subject: [PATCH] ci: require CI to pass before merging into main A ruleset on main now requires the test, test-linux, lint and goreleaser checks. GITHUB_TOKEN cannot bypass a ruleset on a personal repo, so the release workflow pushes the cask with a deploy key that the ruleset lets through. ci.yml also ran on pushes to master, which does not exist. It now runs on pushes to main. --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 1 + .goreleaser.yml | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eed097..9481429 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: ci on: push: - branches: [master] + branches: [main] pull_request: permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e137c58..36b5981 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,3 +37,4 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CASK_DEPLOY_KEY: ${{ secrets.CASK_DEPLOY_KEY }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 08848b5..44fc1dc 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -33,13 +33,17 @@ changelog: release: mode: keep-existing -# Each release writes Casks/rexdiff.rb to this repo. The release workflow -# gives GITHUB_TOKEN the write access for it. +# Each release writes Casks/rexdiff.rb to this repo. main requires CI to +# pass, and GITHUB_TOKEN cannot bypass that, so the push uses a deploy key +# that the ruleset lets through. The release workflow passes it in. homebrew_casks: - repository: owner: frinfo702 name: rexdiff branch: main + git: + url: git@github.com:frinfo702/rexdiff.git + private_key: "{{ .Env.CASK_DEPLOY_KEY }}" directory: Casks homepage: https://github.com/frinfo702/rexdiff description: Review the changes of a coding agent in Rex