Skip to content

Commit

Permalink
github-ci: modify bundleName as workaround and use signature material…
Browse files Browse the repository at this point in the history
…s in github secret

use ONIRO_APP_SIGNATURE_ZIP secret for signature materials.
set signature material path to proper signature directory extracted from
github secrets.
modify bundleName as workarount to use the same signature materials for
multiple apps.

Related-issue:
eclipse-oniro4openharmony/oniro-planning#5

Signed-off-by: Francesco Pham <[email protected]>
  • Loading branch information
Francesco Pham authored and frankplus committed Dec 21, 2024
1 parent 6760f0e commit f8dec6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test-sdk-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# - .p12 file: Keystore containing private key
run: |
# Decode base64 secret to zip file
echo "${{ secrets.OH_SECRETS_ZIP }}" | base64 -d > secrets.zip
echo "${{ secrets.ONIRO_APP_SIGNATURE_ZIP }}" | base64 -d > secrets.zip
# Extract files while preserving directory structure
unzip -o secrets.zip
Expand All @@ -44,6 +44,14 @@ jobs:
echo "=== Extracted Signing Materials ==="
tree .secret -L 4
- name: Modify bundleName in app.json5
run: |
echo "Modifying bundleName in app.json5 to match the one in the signature materials"
echo "this is a temporary workaround for using the same signature materials stored"
echo "in GitHub secrets for multiple apps."
echo "See: https://github.com/eclipse-oniro4openharmony/oniro-planning/issues/5#issuecomment-2538648996"
sed -i '' 's/"bundleName": "[^"]*"/"bundleName": "com.example.oniromathpunching"/' ./AppScope/app.json5
- name: Test oh-action
uses: ./
with:
Expand Down
10 changes: 5 additions & 5 deletions example/open-harmony/sdk-11/Sample/build-profile.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
{
"name": "default",
"material": {
"storePassword": "0000001B32139C7B0CF88ECEF8BC17A20CF3B0248EDACC9A35A5B010EF2CEA1BCF2D0B6B787F722CD21C5B",
"certpath": "./.secret/default_Sample_ZlVeQZos8mspxZbFbZnVyf732f_twgPKWq0w0_cPEao=.cer",
"certpath": "./.secret/oniro-ci.cer",
"storePassword": "0000001BD5A16C997F0EF958596A946A060A50ED61DF4D945A74AB3C462CBCFBE5BA90427A3DEAC0D27D3E",
"keyAlias": "debugKey",
"keyPassword": "0000001B31FBD903B2DF5212AB9C89C0E95A058866575E064356D02A8DA9FE1DE702A4A80D34F0EBC5512E",
"profile": "./.secret/default_Sample_ZlVeQZos8mspxZbFbZnVyf732f_twgPKWq0w0_cPEao=.p7b",
"keyPassword": "0000001BACA49D623B16BE8A9C4C216A9ED64244F7255BC9AEF8C862264DDA900496AD36202857353771E8",
"profile": "./.secret/oniro-ci.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "./.secret/default_Sample_ZlVeQZos8mspxZbFbZnVyf732f_twgPKWq0w0_cPEao=.p12"
"storeFile": "./.secret/oniro-ci.p12"
}
}
],
Expand Down

0 comments on commit f8dec6f

Please sign in to comment.