New Version Checker #241
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: New Version Checker | |
on: | |
schedule: | |
- cron: "0 */12 * * *" | |
workflow_dispatch: | |
jobs: | |
check-notify: | |
name: Check & Notify | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pycurl deps | |
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev | |
- name: Update certs | |
run: | | |
sudo update-ca-certificates | |
sudo mkdir -p /etc/pki/tls/certs | |
sudo cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt | |
- name: Install nvchecker | |
run: pip install nvchecker | |
- name: Setup Just | |
uses: extractions/setup-just@v2 | |
- name: Run check.sh | |
run: just nvcheck > nver.txt | |
- name: Read nver.txt | |
id: nver | |
uses: juliangruber/read-file-action@v1 | |
with: | |
trim: false | |
path: ./nver.txt | |
- name: Add summary | |
if: "endsWith(steps.nver.outputs.content, '\n')" | |
run: echo "${{ steps.nver.outputs.content }}" >> $GITHUB_STEP_SUMMARY | |
- name: Send mail | |
if: "endsWith(steps.nver.outputs.content, '\n')" | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: ${{ secrets.MAIL_SMTP_ADDRESS }} | |
server_port: 465 | |
username: ${{ secrets.MAIL_USERNAME }} | |
password: ${{ secrets.MAIL_PASSWORD }} | |
subject: AUR New Version Checker (${{ github.run_number }}) | |
body: | | |
nvchecker found new versions via GitHub Actions [1] | |
${{ steps.nver.outputs.content }} | |
[1] https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
to: ${{ secrets.MAIL_TO }} | |
from: ${{ secrets.MAIL_FROM }} |