Show packages
" >> $GITHUB_STEP_SUMMARY
+ echo "Before: $BEFORE_VERSION" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ AFTER_VERSION=$(find $SOURCE -type f -name "${INSTALL%% *}*.deb" -exec dpkg-deb -f {} Version \; | sort | uniq | tail -n 1 | cut -d":" -f2 | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
+
+ echo "AFTER_VERSION=${AFTER_VERSION}" >> $GITHUB_OUTPUT
+
+ echo "After: $AFTER_VERSION" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ find $SOURCE -type f -name "*.deb" | rev | cut -d"/" -f1 | rev | sed -e 's/^/- /;'>> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "
" >> $GITHUB_STEP_SUMMARY
+
if [[ ${TARGET} == main ]]; then
if grep -qE 'B' <<< "$REPOSITORY"; then find $SOURCE -type f -name "*.deb" -exec cp {} build/output/debs-beta/ \;; fi
if grep -qE 'S' <<< "$REPOSITORY"; then find $SOURCE -type f -name "*.deb" -exec cp {} build/output/debs/ \;; fi
@@ -289,11 +298,15 @@ jobs:
done
fi
- - name: Deploy to server
- if: inputs.REFERENCE == 'main'
+ - name: "Deploy to stable server. Old: ${{ steps.calculate.outputs.BEFORE_VERSION }} - New: ${{ steps.calculate.outputs.AFTER_VERSION }}"
+ if: ${{ steps.calculate.outputs.BEFORE_VERSION != steps.calculate.outputs.AFTER_VERSION }}
run: |
rsync -e "ssh -p ${{ secrets.HOST_UPLOAD_PORT }}" -arvc build/output/debs/ ${{ secrets.HOST_UPLOAD_USER }}@${{ secrets.HOST_UPLOAD }}:/incoming/debs
+
+ - name: "Deploy to beta server"
+ run: |
+
rsync -e "ssh -p ${{ secrets.HOST_UPLOAD_PORT }}" -arvc build/output/debs-beta/ ${{ secrets.HOST_UPLOAD_USER }}@${{ secrets.HOST_UPLOAD }}:/incoming/debs-beta
- name: Build testing repository
@@ -302,12 +315,9 @@ jobs:
# read config once again
. os/external/${{ matrix.node }}.conf
cd build
- mkdir -p repository/public
+ mkdir -p output/repository/public
sed -i 's|"gpgProvider": ".*"|"gpgProvider": "gpg2"|g' tools/repository/aptly.conf
tools/repository/repo -i output/debs-beta -c update -p ${{ secrets.GPG_PASSPHRASE1 }}
- # show version of package
- echo "New version:" >> $GITHUB_STEP_SUMMARY
- tools/repository/repo -c show | grep -w "${INSTALL%% *}" || true >> $GITHUB_STEP_SUMMARY
rsync -arvc --rsync-path="mkdir -p /var/www/netcup.armbian.com/html/artifacts/${{ env.PR_NUMBER }}/${{ matrix.node }} && rsync" output/repository/public/ ${{ inputs.HOST_USER }}@${{ inputs.HOST_DEPLOY }}:"/var/www/netcup.armbian.com/html/artifacts/${{ env.PR_NUMBER }}/${{ matrix.node }}"
test: