Skip to content
New issue

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

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

Already on GitHub? # to your account

Add optional directory input to GitHub action #5

Merged
merged 3 commits into from
Feb 15, 2022

Conversation

Sherlouk
Copy link
Contributor

Justification

I understand that this is not the most common use case, but some teams use a mono-repo where the Package.swift may not be at the root of the project. In my project, I have multiple directories containing multiple Swift Vapor servers. Unfortunately this GitHub action in its current form would not work as it was unable to run the Swift command from the root of the project.

Changes

This pull request introduces a new input parameter called "directory". If provided, this will change the active directory to the path provided before running any further commands.

    - name: Check Swift Package dependencies
      id: spm-dep-check
      uses: Sherlouk/swift-package-dependencies-check@main
      with:
         isMutating: true
         failWhenOutdated: false
         directory: 'Ingest'

It has been tested with the above snippet, it successfully found the "Ingest" directory. This is not a breaking change.

Apology

I made all the code changes within GitHub's file editor which is not the great but is my excuse for the poor commits. Feel free to squash/rebase into a single commit.

@MarcoEidinger
Copy link
Owner

Hi @Sherlouk, great idea and wonderful that you opened this pull request !! Will merge it soon. Once merged I will create version 2.1.3 and switch v2 to it

@MarcoEidinger MarcoEidinger merged commit 13f600b into MarcoEidinger:main Feb 15, 2022
@MarcoEidinger
Copy link
Owner

Merged, version 2.1.3 created and v2 switched :)

Thank you again @Sherlouk and I mentioned you on Twitter to express my gratitude

https://twitter.com/MarcoEidinger/status/1493466000410365953

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants