File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : write
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Get tag
18+ id : tag
19+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
20+
21+ - name : Update update.json
22+ env :
23+ VERSION : ${{ steps.tag.outputs.VERSION }}
24+ REPO : ${{ github.repository }}
25+ run : |
26+ NEW_CODE=$(( $(jq -r '.versionCode' update.json) + 1 ))
27+ jq --arg v "$VERSION" \
28+ --argjson c "$NEW_CODE" \
29+ --arg z "https://github.com/${REPO}/releases/download/${VERSION}/CustomCACert-${VERSION}.zip" \
30+ --arg cl "https://github.com/${REPO}/releases/tag/${VERSION}" \
31+ '.version=$v | .versionCode=$c | .zipUrl=$z | .changelog=$cl' \
32+ update.json > tmp.json && mv tmp.json update.json
33+
34+ - name : Commit update.json
35+ run : |
36+ git config user.name "github-actions[bot]"
37+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+ git add update.json
39+ git diff --cached --quiet || git commit -m "Update update.json for ${{ steps.tag.outputs.VERSION }}"
40+ git push origin HEAD:main
41+
42+ - name : Build zip
43+ run : |
44+ zip -r "CustomCACert-${{ steps.tag.outputs.VERSION }}.zip" \
45+ META-INF \
46+ module.prop \
47+ post-fs-data.sh \
48+ system \
49+ LICENSE \
50+ update.json
51+
52+ - name : Create release
53+ uses : softprops/action-gh-release@v2
54+ with :
55+ files : CustomCACert-${{ steps.tag.outputs.VERSION }}.zip
56+ generate_release_notes : true
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ if [ -d /apex/com.android.conscrypt/cacerts ]; then
4848 else
4949 echo " Cancelling replacing CA storage due to safety"
5050 fi
51+ for pid in 1 $( pgrep zygote) $( pgrep zygote64) ; do
52+ nsenter --mount=/proc/${pid} /ns/mnt -- \
53+ umount /data/local/tmp/sys-ca-copy
54+ done
5155 umount /data/local/tmp/sys-ca-copy
5256 rmdir /data/local/tmp/sys-ca-copy
5357fi
You can’t perform that action at this time.
0 commit comments