aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2026-01-06 22:36:43 +0100
committerGitHub <noreply@github.com>2026-01-06 22:36:43 +0100
commitc89353dede64bd2c21c0a1ebd6b6de6282998326 (patch)
tree1618f81c25742c02e573753a26b4faa17e3ad625 /.github/workflows
parenta3eb2d0441ae18f75604a4bee64db18391469837 (diff)
Remove outdated CI workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/update-stops-data.yml103
1 files changed, 0 insertions, 103 deletions
diff --git a/.github/workflows/update-stops-data.yml b/.github/workflows/update-stops-data.yml
deleted file mode 100644
index 439247b..0000000
--- a/.github/workflows/update-stops-data.yml
+++ /dev/null
@@ -1,103 +0,0 @@
-name: Update Stops Data
-
-on:
- schedule:
- - cron: '0 0 * * *'
- workflow_dispatch:
-
-jobs:
- update-stops-data:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v5
- with:
- fetch-depth: 0 # Fetch all branches
-
- - name: Check for existing branch and PR
- id: check_existing
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- # Look for existing open PR with our title
- existing_pr=$(gh pr list --json number,headRefName --search "Update stops data in:title author:app/github-actions is:open" --limit 1)
-
- if [[ $(echo "$existing_pr" | jq length) -gt 0 ]]; then
- branch_name=$(echo "$existing_pr" | jq -r '.[0].headRefName')
- pr_number=$(echo "$existing_pr" | jq -r '.[0].number')
- echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
- echo "pr_number=$pr_number" >> $GITHUB_OUTPUT
- echo "has_existing=true" >> $GITHUB_OUTPUT
- echo "Found existing PR #$pr_number with branch $branch_name"
- else
- branch_name="update-stops-data"
- echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
- echo "has_existing=false" >> $GITHUB_OUTPUT
- echo "No existing PR found, will use branch $branch_name"
- fi
-
- - name: Setup branch
- env:
- BRANCH_NAME: ${{ steps.check_existing.outputs.branch_name }}
- HAS_EXISTING: ${{ steps.check_existing.outputs.has_existing }}
- run: |
- git config user.name "github-actions[bot]"
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
-
- if [[ "$HAS_EXISTING" == "true" ]]; then
- # Checkout existing branch
- git fetch origin $BRANCH_NAME
- git checkout $BRANCH_NAME
- echo "Checked out existing branch $BRANCH_NAME"
- else
- # Create new branch
- git checkout -b $BRANCH_NAME
- echo "Created new branch $BRANCH_NAME"
- fi
-
- - name: Install uv
- uses: astral-sh/setup-uv@v7
-
- - name: Run download script
- run: |
- uv run src/stop_downloader/vigo/download-stops.py
-
- - name: Commit and push changes if any
- id: commit
- env:
- BRANCH_NAME: ${{ steps.check_existing.outputs.branch_name }}
- HAS_EXISTING: ${{ steps.check_existing.outputs.has_existing }}
- run: |
- git add src/frontend/public/stops/*.json
-
- if git diff --staged --exit-code; then
- echo "No changes to commit"
- echo "changes_made=false" >> $GITHUB_OUTPUT
- else
- git commit -m "Update stops data"
- git push origin $BRANCH_NAME --force-with-lease
- echo "changes_made=true" >> $GITHUB_OUTPUT
- echo "Committed and pushed changes to $BRANCH_NAME"
- fi
-
- - name: Create or update Pull Request
- if: steps.commit.outputs.changes_made == 'true'
- env:
- GH_TOKEN: ${{ github.token }}
- BRANCH_NAME: ${{ steps.check_existing.outputs.branch_name }}
- HAS_EXISTING: ${{ steps.check_existing.outputs.has_existing }}
- PR_NUMBER: ${{ steps.check_existing.outputs.pr_number }}
- run: |
- if [[ "$HAS_EXISTING" == "true" ]]; then
- # Update existing PR with a comment
- gh pr comment $PR_NUMBER --body "🔄 Stops data updated on $(date -u +"%Y-%m-%d %H:%M:%S UTC")"
- echo "Updated existing PR #$PR_NUMBER"
- else
- # Create new PR
- gh pr create \
- --title "Update stops data" \
- --body "Automatically generated PR with updated stops data from scheduled fetch." \
- --base main \
- --head "$BRANCH_NAME"
- echo "Created new PR"
- fi