From 3c8189c7e71252f27dcfc2e046c880393485f35e Mon Sep 17 00:00:00 2001 From: zenobit Date: Sat, 8 Mar 2025 01:39:22 +0100 Subject: [PATCH] Update distrosFeed.yml --- .github/workflows/distrosFeed.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/distrosFeed.yml b/.github/workflows/distrosFeed.yml index f0640b4..7aba627 100644 --- a/.github/workflows/distrosFeed.yml +++ b/.github/workflows/distrosFeed.yml @@ -1,9 +1,5 @@ -# This is a basic workflow that is manually triggered - name: Get latest ISOs links -# Controls when the action will run. Workflow runs when manually triggered using the UI -# or API. on: workflow_dispatch: schedule: @@ -19,15 +15,17 @@ jobs: - uses: actions/checkout@v4 - name: Get latest ISOs links - run: curl -s https://distrowatch.com | grep 'News".*\.iso' | cut -d '"' -f4,6 | sed 's/"/ /g' | column --table | tee -a ISOs.list - - - name: "Git Config" run: | - git config --global user.name "${{ github.repository_owner }}" - git config --global user.email "noreply@github.com" + 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 + + - 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 commit -m "update ISOs list" - git push + git diff --cached --quiet || (git commit -m "update ISOs list" && git push)