|
22 | 22 | secrets: |
23 | 23 | MINISIGN_SECRET_KEY: |
24 | 24 | required: true |
| 25 | + REGISTRY_GPG_PRIVATE_KEY: |
| 26 | + required: true |
| 27 | + REGISTRY_GPG_PASSPHRASE: |
| 28 | + required: true |
| 29 | + REGISTRY_GPG_KEY_ID: |
| 30 | + required: true |
25 | 31 |
|
26 | 32 | env: |
27 | 33 | CARGO_TERM_COLOR: always |
@@ -188,12 +194,37 @@ jobs: |
188 | 194 | mkdir -p docs/public/registry |
189 | 195 | cp -R dist/registry/* docs/public/registry/ |
190 | 196 |
|
| 197 | + - name: Configure signed registry commits |
| 198 | + env: |
| 199 | + REGISTRY_GPG_PRIVATE_KEY: ${{ secrets.REGISTRY_GPG_PRIVATE_KEY }} |
| 200 | + REGISTRY_GPG_PASSPHRASE: ${{ secrets.REGISTRY_GPG_PASSPHRASE }} |
| 201 | + REGISTRY_GPG_KEY_ID: ${{ secrets.REGISTRY_GPG_KEY_ID }} |
| 202 | + run: | |
| 203 | + mkdir -p ~/.gnupg |
| 204 | + chmod 700 ~/.gnupg |
| 205 | + echo "${REGISTRY_GPG_PRIVATE_KEY}" | gpg --batch --import |
| 206 | + key_id="${REGISTRY_GPG_KEY_ID}" |
| 207 | + passphrase_file="/tmp/registry-gpg-passphrase" |
| 208 | + printf "%s" "${REGISTRY_GPG_PASSPHRASE}" > "${passphrase_file}" |
| 209 | + chmod 600 "${passphrase_file}" |
| 210 | + cat > /tmp/gpg-wrapper.sh <<'EOF' |
| 211 | + #!/usr/bin/env bash |
| 212 | + exec gpg --batch --yes --pinentry-mode loopback --passphrase-file /tmp/registry-gpg-passphrase "$@" |
| 213 | + EOF |
| 214 | + chmod +x /tmp/gpg-wrapper.sh |
| 215 | + git config user.name "StreamKit Registry Bot" |
| 216 | + git config user.email "registry-bot@streamkit.dev" |
| 217 | + git config user.signingkey "${key_id}" |
| 218 | + git config commit.gpgsign true |
| 219 | + git config gpg.program /tmp/gpg-wrapper.sh |
| 220 | +
|
191 | 221 | - name: Create pull request |
192 | 222 | uses: peter-evans/create-pull-request@v6 |
193 | 223 | with: |
194 | | - branch: "registry/${{ env.RELEASE_TAG }}" |
| 224 | + branch: "registry/${{ env.RELEASE_TAG }}-${{ github.run_id }}" |
195 | 225 | title: "chore(registry): publish marketplace registry for ${{ env.RELEASE_TAG }}" |
196 | 226 | commit-message: "chore(registry): publish marketplace registry for ${{ env.RELEASE_TAG }}" |
197 | 227 | body: | |
198 | 228 | Automated registry metadata update for `${{ env.RELEASE_TAG }}`. |
| 229 | + delete-branch: true |
199 | 230 | base: main |
0 commit comments