Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/upload-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,23 @@ jobs:
echo "${{secrets.PUBTEST_CERT}}" > pubtest.crt
echo "${{secrets.PUBTEST_KEY}}" > pubtest.key
PKG_REPO=${{inputs.pkgRepo}} CERT=pubtest.crt KEY=pubtest.key DL=1 scripts/packages/package-check.sh ${{inputs.pkgVersion}}
for i in $(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"); do
if [[ "$i" == *.deb ]]; then
echo "Renaming ${i} to ${i/_/-}"
mv "${i}" "${i/_/-}"
fi
if [[ "$i" == *.apk ]]; then
ver=$(echo "$i" | grep -o -e "v[0-9]*\.[0-9]*")
arch=$(echo "$i" | grep -o -F -e "x86_64" -e "aarch64")
dest="$(dirname "$i")/nginx-agent-${{inputs.pkgVersion}}-$ver-$arch.apk"
echo "Renaming ${i} to ${dest}"
mv "${i}" "${dest}"
fi
done
find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"

- name: GitHub Upload
continue-on-error: true
if: ${{ needs.vars.outputs.github_release == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -88,11 +102,6 @@ jobs:
inlineScript: |
for i in $(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"); do
dest="nginx-agent/${GITHUB_REF##*/}/${i##*/}"
if [[ "$i" == *.apk ]]; then
ver=$(echo "$i" | grep -o -e "v[0-9]*\.[0-9]*")
arch=$(echo "$i" | grep -o -F -e "x86_64" -e "aarch64")
dest="nginx-agent/${GITHUB_REF##*/}/nginx-agent-$VER-$ver-$arch.apk"
fi
echo "Uploading ${i} to ${dest}"
az storage blob upload --auth-mode=login -f "$i" -c ${{ secrets.AZURE_CONTAINER_NAME }} \
--account-name ${{ secrets.AZURE_ACCOUNT_NAME }} --overwrite -n ${dest}
Expand Down