wikipathways / wikipathways-development

Roadmap planning, developer documentation, contribution guidelines
2 stars 0 forks source link

frontmatter job in on_gpml_change is not using latest GPML #61

Closed AlexanderPico closed 2 years ago

AlexanderPico commented 2 years ago

To reproduce:

  1. Edit title in WP1.gpml
  2. Commit/push to trigger workflow

Obs:

Do we need to insert another "pull hack" here: https://github.com/wikipathways/wikipathways-database/blob/main/.github/workflows/on_gpml_change.yml#L176? Like we did here: https://github.com/wikipathways/wikipathways-database/blob/main/.github/workflows/on_gpml_change.yml#L316?

Feels like we're doing something wrong, systematically. We shouldn't need any of these "pull hacks," right?

AlexanderPico commented 2 years ago

I think I found others with the same issue! Will try these solutions. https://github.com/actions/checkout/issues/439

AlexanderPico commented 2 years ago

Oddly enough, I think this fixed the issue. We had to specify fetch-depth and ref like so:

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ref: main

In all subsequent checkouts within a workflow (when following a commit job). This forces the job to pull the latest rather than the same revision that was pulled at the start of the workflow.

I've updated all our ymls to use this pattern and I removed the cd/pull/cd hack. And my test edit of WP1 passed!