64
64
echo "${{secrets.PUBTEST_CERT}}" > pubtest.crt
65
65
echo "${{secrets.PUBTEST_KEY}}" > pubtest.key
66
66
PKG_REPO=${{inputs.pkgRepo}} CERT=pubtest.crt KEY=pubtest.key DL=1 scripts/packages/package-check.sh ${{inputs.pkgVersion}}
67
+ for i in $(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"); do
68
+ if [[ "$i" == *.deb ]]; then
69
+ echo "Renaming ${i} to ${i/_/-}"
70
+ mv "${i}" "${i/_/-}"
71
+ fi
72
+ if [[ "$i" == *.apk ]]; then
73
+ ver=$(echo "$i" | grep -o -e "v[0-9]*\.[0-9]*")
74
+ arch=$(echo "$i" | grep -o -F -e "x86_64" -e "aarch64")
75
+ dest="$(dirname "$i")/nginx-agent-${{inputs.pkgVersion}}-$ver-$arch.apk"
76
+ echo "Renaming ${i} to ${dest}"
77
+ mv "${i}" "${dest}"
78
+ fi
79
+ done
67
80
find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"
68
81
69
82
- name : GitHub Upload
83
+ continue-on-error : true
70
84
if : ${{ needs.vars.outputs.github_release == 'true' }}
71
85
env :
72
86
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -88,11 +102,6 @@ jobs:
88
102
inlineScript : |
89
103
for i in $(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"); do
90
104
dest="nginx-agent/${GITHUB_REF##*/}/${i##*/}"
91
- if [[ "$i" == *.apk ]]; then
92
- ver=$(echo "$i" | grep -o -e "v[0-9]*\.[0-9]*")
93
- arch=$(echo "$i" | grep -o -F -e "x86_64" -e "aarch64")
94
- dest="nginx-agent/${GITHUB_REF##*/}/nginx-agent-$VER-$ver-$arch.apk"
95
- fi
96
105
echo "Uploading ${i} to ${dest}"
97
106
az storage blob upload --auth-mode=login -f "$i" -c ${{ secrets.AZURE_CONTAINER_NAME }} \
98
107
--account-name ${{ secrets.AZURE_ACCOUNT_NAME }} --overwrite -n ${dest}
0 commit comments