File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 description : OIDC token の audience(watchtower 側 WATCHTOWER_OIDC_AUDIENCE と一致させる)
1515 type : string
1616 default : watchtower
17+ slug :
18+ description : |
19+ プラグイン slug(シート H列)。リポ名と異なる / monorepo の場合に指定。
20+ 未指定ならリポ名(repository クレーム由来)が使われる。
21+ type : string
22+ default : ' '
1723
1824jobs :
1925 notify :
2733 ENDPOINT : ${{ inputs.endpoint }}
2834 AUDIENCE : ${{ inputs.audience }}
2935 VERSION : ${{ github.event.release.tag_name }}
36+ SLUG : ${{ inputs.slug }}
3037 run : |
3138 set -euo pipefail
3239
4249
4350 # 2. watchtower へ通知。プラグイン名はトークンの repository クレームから
4451 # watchtower 側で導出されるため、body には version(tag) だけ送る。
45- PAYLOAD=$(jq -nc --arg v "$VERSION" '{version:$v}')
52+ # slug を指定した場合(リポ名 ≠ プラグイン slug / monorepo)は body に含める。
53+ if [ -n "$SLUG" ]; then
54+ PAYLOAD=$(jq -nc --arg v "$VERSION" --arg s "$SLUG" '{version:$v, slug:$s}')
55+ else
56+ PAYLOAD=$(jq -nc --arg v "$VERSION" '{version:$v}')
57+ fi
4658 HTTP_CODE=$(curl -sS -o /tmp/resp.json -w '%{http_code}' \
4759 -X POST "$ENDPOINT" \
4860 -H "Authorization: Bearer $TOKEN" \
You can’t perform that action at this time.
0 commit comments