Revert "github actions: disable uploads to grimler.se"

This reverts commit bc0642e5d7.
This commit is contained in:
Leonid Pliushch 2021-06-03 01:10:50 +03:00
parent bc0642e5d7
commit b5bdfe3522
No known key found for this signature in database
GPG Key ID: 45F2964132545795

View File

@ -175,3 +175,29 @@ jobs:
curl --fail -X PUT -u "${{ secrets.APTLY_API_AUTH }}" \
https://packages.termux.org/aptly-api/publish/${REPOSITORY_NAME}/${REPOSITORY_DISTRIBUTION}
fi
- name: Setup ssh key and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
echo "${{ secrets.KNOWN_HOST_ENTRY }}" >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK
ssh-add - <<< "${{ secrets.SSHKEY }}"
- name: Upload to grimler.se
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
# Zip the deb archives to only do one transfer to the repo.
# This makes it easier to parse it, we can run one update job
# instead of one for each arch on the server.
archive="termux-packages-${{ github.sha }}.zip"
deb_archives=$(find -maxdepth 1 -name "debs-*-${{ github.sha }}.tar")
if [ -z "$deb_archives" ]; then
echo "No archives to upload found"
exit 0
fi
zip $archive ${deb_archives}
sftp -P ${{ secrets.PORT }} ${{ secrets.USER }}@grimler.se <<EOF
put $archive /debs/
EOF