Skip to content

ci: replace tj-actions#393

Merged
aliziel merged 1 commit into
mainfrom
ci/rm-tj-actions
Jul 28, 2025
Merged

ci: replace tj-actions#393
aliziel merged 1 commit into
mainfrom
ci/rm-tj-actions

Conversation

@aliziel

@aliziel aliziel commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

What I am changing

Replace @tj-actions/changed-files

Addresses https://github.com/NASA-IMPACT/veda-architecture/issues/570

NOTE: The workflow trigger uses a glob pattern match (ingestion-data/staging/dataset-config/**.json), whereas the current bash uses a regex pattern match (^ingestion-data/staging/dataset-config/.*\.json$)

How I did it

  • Align with tj-actions behavior
    • Identify changed files, excluding full deletions
    • Surface only the new name on file renames
    • Add files + count to output
    • Verify coverage on any branching codepaths

How you can test it

Locally, via act

  1. Pull down this branch + branch off of it

  2. Commit a change outside of the target filepaths (e.g. an edit in ingestion-data/staging/discovery-items/, a top-level CONTRIBUTING.md add)

  3. Run act, being sure to pass in event information required for the workflow

    1.  $ act pull_request -W .github/workflows/pr.yml -e ./event.json
       # ...
       # [Publish collection to staging/publish-new-datasets] ⚙ ::set-output:: all_changed_files=
       # [Publish collection to staging/publish-new-datasets] ⚙ ::set-output:: all_changed_files_count=0
      Expect → changed files not to flag for publication
      Expect → exit early condition to pass
  4. Commit several change types (adds, edits, renames, deletes, etc.) throughout the repo, with at least one in the target filepath(s), and rerun act

    1.  $ act pull_request -W .github/workflows/pr.yml -e ./event.json
       # ...
       # [Publish collection to staging/publish-new-datasets] ⚙ ::set-output:: all_changed_files=ingestion-data/staging/dataset-config/x.json ingestion-data/staging/collections/y.json
       # [Publish collection to staging/publish-new-datasets] ⚙ ::set-output:: all_changed_files_count=2
      Expect → added, copied, modified, renamed files in the target filepaths to flag for publication
      Expect → deleted files in the target filepaths not to flag for publication
      Expect → data types, expression evaluation to remain consistent (e.g. file list is still iterable, file count is still expected to be a number)

@aliziel aliziel requested a review from smohiudd as a code owner July 15, 2025 05:07
@aliziel aliziel requested review from anayeaye and botanical and removed request for botanical and smohiudd July 15, 2025 05:09
@aliziel

aliziel commented Jul 25, 2025

Copy link
Copy Markdown
Contributor Author

Will merge on Monday, thank you both !

@aliziel aliziel merged commit d9fbe82 into main Jul 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants