Skip to content

Commit

Permalink
apk: apply key
Browse files Browse the repository at this point in the history
  • Loading branch information
muink committed Dec 5, 2024
1 parent 095913d commit 10c14a8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ jobs:
done
cat SDK/feeds.conf.default
# key-build
echo "$USIGN_KEY" > SDK/key-build
echo "$USIGN_PUBKEY" > SDK/key-build.pub
echo "$APK_SIGN_KEY" > SDK/private-key.pem
echo "$APK_SIGN_PUBKEY" > SDK/public-key.pem
endgroup
# Build start
NPROC=$(nproc)
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
NO_SHFMT_CHECK: 1
PACKAGES: ${{ env.PACKAGES }}
INDEX: 1
KEY_BUILD: ${{ env.USIGN_KEY }}
KEY_BUILD: ${{ env.APK_SIGN_KEY }}
V: s

- name: Upload error logs
Expand Down Expand Up @@ -349,13 +349,13 @@ jobs:
done
#
pushd "$GITHUB_WORKSPACE/${{ inputs.GHPAGES_PATH }}/$BRANCH"
echo "$USIGN_PUBKEY" > ${USIGN_ID,,}.pub
cat <<- EOF > ${USIGN_ID,,}.sh
echo "$APK_SIGN_PUBKEY" > ${APK_SIGN_ID,,}.pub
cat <<- EOF > ${APK_SIGN_ID,,}.sh
#!/bin/sh
KEYID=${USIGN_ID,,}
mkdir -p /etc/opkg/keys 2>/dev/null
cat <<- PUBKEY > /etc/opkg/keys/\${KEYID}
${USIGN_PUBKEY}
KEYID=${APK_SIGN_ID,,}
mkdir -p /etc/apk/keys 2>/dev/null
cat <<- PUBKEY > /etc/apk/keys/fantastic-packages-\${KEYID}.pem
${APK_SIGN_PUBKEY}
PUBKEY
EOF
if [ "${{env.GPG_SIGN}}" == "true" ]; then
Expand Down Expand Up @@ -387,8 +387,8 @@ jobs:
shell: bash
run: |
KEY_VERIFY=''
for k in ${VERIFY_KEY_ID}; do
key="$(cat "$GITHUB_WORKSPACE/keys/usign/${k^^}.pub" | base64)"
for k in ${APK_SIGN_VERIFY_KEY_ID}; do
key="$(cat "$GITHUB_WORKSPACE/keys/apksign/${k}.pub" | base64)"
KEY_VERIFY="${KEY_VERIFY:+$KEY_VERIFY }${key//[[:space:]]/}"
done
echo "KEY_VERIFY=$KEY_VERIFY"
Expand All @@ -407,8 +407,8 @@ jobs:
src|${{ env.FTSPKGPREFIX }}luci|file:///repo/${{ env.FTSPKGPREFIX }}luci
src|${{ env.FTSPKGPREFIX }}special|file:///repo/${{ env.FTSPKGPREFIX }}special
NO_LOCAL_REPOS: 1
KEY_BUILD: ${{ env.USIGN_KEY }}
KEY_BUILD_PUB: ${{ env.USIGN_PUBKEY }}
KEY_BUILD: ${{ env.APK_SIGN_KEY }}
KEY_BUILD_PUB: ${{ env.APK_SIGN_PUBKEY }}
KEY_VERIFY: ${{ env.KEY_VERIFY }}
PACKAGES: ${{ env.INSTALLS }}
ROOTFS_SIZE: 256
Expand Down

0 comments on commit 10c14a8

Please sign in to comment.