35 lines
898 B
YAML
35 lines
898 B
YAML
name: Get latest ISOs links from DistroWatch
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 */6 * * *'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
get:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Get latest ISOs links
|
|
run: |
|
|
curl -s https://distrowatch.com | grep 'News".*\.iso' | awk -F'"' '{print $4, $6}' | column --table > ISOs.tmp
|
|
sort -u ISOs.tmp -o ISOs.tmp
|
|
mv ISOs.tmp ISOs.list
|
|
echo "on DW are:" >> $GITHUB_STEP_SUMMARY
|
|
NEW=$(cat ISOs.list)
|
|
echo "${NEW}" >> $GITHUB_STEP_SUMMARY
|
|
|
|
- name: Git Config
|
|
run: |
|
|
git config --local user.name "${{ github.repository_owner }}"
|
|
git config --local user.email "noreply@github.com"
|
|
|
|
- name: Update list
|
|
run: |
|
|
git add ISOs.list
|
|
git diff --cached --quiet || (git commit -m "update ISOs list" && git push)
|