Manual Full Feed Rebuild (legacy space entry point) #4744
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 Space & Defense Feeds (space-tech + space-force) | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| - cron: "0 * * * *" # hourly | |
| concurrency: | |
| group: space-defense | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f scripts/requirements.txt ]; then pip install -r scripts/requirements.txt; \ | |
| elif [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Install yq (YAML CLI) | |
| run: | | |
| sudo curl -L -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 | |
| sudo chmod +x /usr/local/bin/yq | |
| yq --version | |
| - name: Backup original feeds.yaml | |
| run: cp feeds.yaml feeds.yaml.bak | |
| # Keep only the two areas we want to build | |
| - name: Filter feeds.yaml to only space-tech & space-force | |
| run: | | |
| echo "Before filter:"; yq '.areas | keys' feeds.yaml | |
| yq -i ' | |
| .areas |= with_entries( | |
| select(.key == "space-tech" or .key == "space-force") | |
| ) | |
| ' feeds.yaml | |
| echo "After filter:"; yq '.areas | keys' feeds.yaml | |
| - name: Build area feeds (filtered) | |
| run: | | |
| python scripts/update_feeds.py | |
| - name: Restore original feeds.yaml | |
| if: always() | |
| run: mv -f feeds.yaml.bak feeds.yaml | |
| - name: Commit generated files | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| git add -A | |
| git diff --cached --quiet || git commit -m "chore: update space & defense feeds [skip ci]" | |
| git push |