[bot/no ci/super-linter] fix formatting #3
This file contains hidden or 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: Update Sources from Configs | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| push: | ||
| description: "Commit and push changes" | ||
| required: false | ||
| default: "true" | ||
| type: boolean | ||
| schedule: | ||
| - cron: '0 2 * * 0' # Run weekly on Sundays at 2 AM UTC | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| update-sources: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Update sources from configs | ||
| run: | | ||
| pwsh tools/update_sources_from_configs.ps1 | ||
| - name: Check for changes | ||
| id: check_changes | ||
| run: | | ||
| if git diff --quiet sources.json; then | ||
| echo "changed=false" >> $GITHUB_OUTPUT | ||
| echo "ℹ️ No changes detected" | ||
| else | ||
| echo "changed=true" >> $GITHUB_OUTPUT | ||
| echo "✅ Changes detected" | ||
| git diff --stat sources.json | ||
| fi | ||
| - name: Commit and push changes | ||
| if: ${{ steps.check_changes.outputs.changed == 'true' && (github.event.inputs.push != 'false' || github.event_name == 'schedule') }} | ||
| run: | | ||
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "github-actions[bot]" | ||
| git add sources.json | ||
| git commit -m "chore: Auto-update sources from configs | ||
| - Fetched latest config from each sourceUrl | ||
| - Updated changed fields (version, description, packages, etc.) | ||
| - Added _installUrl where missing | ||
| - Auto-generated _feeds from repositoryUrl | ||
| - Tagged unreachable sources with 'not-found' | ||
| Generated by update-sources-from-configs.yml workflow" | ||
| git push | ||
| - name: Summary | ||
| run: | | ||
| if [ "${{ github.event.inputs.push }}" = "false" ]; then | ||
| echo "🔍 DRY RUN MODE - No changes were committed" | ||
| elif [ "${{ steps.check_changes.outputs.changed }}" = "true" ]; then | ||
| echo "✅ Changes committed and pushed" | ||
| else | ||
| echo "ℹ️ No changes to commit" | ||
| fi | ||