Skip to content

Commit

Permalink
feat!: ビルドログを公開鍵暗号で暗号化する
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Dec 25, 2024
1 parent e64b576 commit 6d65108
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,18 +468,19 @@ jobs:
1>${{ env.TARGET_LIBRARY == 'onnxruntime' && '&1' || format('{0}_stdout.txt', matrix.artifact_name) }} \
2>${{ env.TARGET_LIBRARY == 'onnxruntime' && '&2' || format('{0}_stderr.txt', matrix.artifact_name) }}
- name: Send build log to Discord
- name: Encrypt the build log
if: failure() && steps.build.outcome == 'failure' && env.TARGET_LIBRARY == 'voicevox_onnxruntime'
run: |
curl \
"$PRODUCTION_DISCORD_WEBHOOK" \
-sf \
-F 'payload_json={"username":"onnxruntime-builder"}' \
-F file1=@${{ matrix.artifact_name }}_stdout.txt \
-F file2=@${{ matrix.artifact_name }}_stderr.txt \
> /dev/null 2>&1
env:
PRODUCTION_DISCORD_WEBHOOK: ${{ secrets.PRODUCTION_DISCORD_WEBHOOK }}
for file in ./${{ matrix.artifact_name }}_{stdout,stderr}.txt; do
gpg -ef ./builder/build-log-pk.asc "$file"
done
- name: Upload the encrypted build log
if: failure() && steps.build.outcome == 'failure' && env.TARGET_LIBRARY == 'voicevox_onnxruntime'
uses: actions/upload-artifact@v4
with:
name: buildlog_${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}_*.txt.gpg

- name: Inspect the build directory for debug

Expand Down
14 changes: 14 additions & 0 deletions build-log-pk.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEZ2uhRBYJKwYBBAHaRw8BAQdAgjW0gf9foFPM4kTkpLsWKPgCSvr4saMEsJLG
R4AKHC60P1J5byBZYW1hc2hpdGEgKFZPSUNFVk9YL29ubnhydW50aW1lLWJ1aWxk
ZXIpIDxxcnl4aXBAZ21haWwuY29tPoiTBBMWCgA7FiEEnUY30hLqc91bVh3h8+dQ
DBoyRVMFAmdroUQCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ8+dQ
DBoyRVOZ2QD/Z7BRLjYVKzWqjPRdISeGPlvZajp/LH5SDYD9xDJnCDMA/1Skbptd
DREf+w4IyuGqB3CDc7UI7n9VGkIuanM5MvgMuDgEZ2uhRBIKKwYBBAGXVQEFAQEH
QGnPx2EDqNGh06WduXTFa4HChWY1qG0ts4wDvepw8cMoAwEIB4h4BBgWCgAgFiEE
nUY30hLqc91bVh3h8+dQDBoyRVMFAmdroUQCGwwACgkQ8+dQDBoyRVOKHgD+OImm
lEc7H7aQAP6716rDAYU2f9TcDcisXwrN/ZNos5kBALkz8dnwRp+KQ8AA3X5GENQw
lFlRs+iNcOJeibJ5yMYO
=IosB
-----END PGP PUBLIC KEY BLOCK-----

0 comments on commit 6d65108

Please sign in to comment.