Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: separate scrape and commit jobs #23

Merged
merged 4 commits into from
Apr 4, 2024
Merged

Commits on Apr 4, 2024

  1. fix(ci): separate scrape and commit jobs

    the scrape job follows the matrix strategy to get the latest data files
    for each participant, and then uploads these files as artifacts to the
    workflow run
    
    the commit job downloads all artifacts into the data/ directory and then
    makes a single commit and push when files have changed
    
    this avoids a couple of problems in the initial implementation:
    
    * a race condition existed in the matrix strategy, where each matrix branch
      was attempting to commit files and push to main at nearly the same time,
      resulting in git conflicts on push
    
    * by using BOT_ACCESS_TOKEN on checkout in the commit job, the rest of
      the git commands are run as the cal-itp-bot user, which has permission
      to bypass branch protection rules for the main branch
    thekaveman committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a3fd1b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    25c623b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac90902 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8192a72 View commit details
    Browse the repository at this point in the history