diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/update-stops-data.yml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.github/workflows/update-stops-data.yml b/.github/workflows/update-stops-data.yml index 6268b5f..d22040d 100644 --- a/.github/workflows/update-stops-data.yml +++ b/.github/workflows/update-stops-data.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all branches - + - name: Check for existing branch and PR id: check_existing env: @@ -21,7 +21,7 @@ jobs: 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') @@ -43,7 +43,7 @@ jobs: 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 @@ -59,7 +59,9 @@ jobs: uses: astral-sh/setup-uv@v7 - name: Run download script - run: uv run data/download-stops.py + run: | + uv run data/vigo/download-stops.py + uv run data/santiago/download-stops.py - name: Commit and push changes if any id: commit @@ -68,7 +70,7 @@ jobs: 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 @@ -78,7 +80,7 @@ jobs: 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: |
