Skip to content

Commit f05f25b

Browse files
aster-voidclaude
andcommitted
sops鍵設定を scripts/sops-env.sh に切り出し
mise.toml の [env] から SOPS_AGE_KEY_FILE を削除し、 .age-key の存在時のみ設定する source 可能なスクリプトに移行。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 22ff45b commit f05f25b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

bots/auto-moderator/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env -S mise exec -- bash
22
set -euo pipefail
33
cd "$(dirname "$0")"
4+
source ../../scripts/sops-env.sh
45

56
bun install --frozen-lockfile
67
sops exec-env sops.env 'bun start'

mise.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ node = "24"
44
biome = "2"
55
sops = "3"
66
age = "1"
7-
8-
[env]
9-
SOPS_AGE_KEY_FILE = "{{ config_root }}/.age-key"

scripts/sops-env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# source this file from run.sh to set SOPS_AGE_KEY_FILE
2+
_repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
3+
[ -f "$_repo_root/.age-key" ] && export SOPS_AGE_KEY_FILE="$_repo_root/.age-key"
4+
unset _repo_root

0 commit comments

Comments
 (0)