Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Add working-directory param #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

reinismu
Copy link

Allows to run clippy in subdirectories and corectly puts annotation

You can test with

            - uses: reinismu/clippy-check@master
              with:
                  token: ${{ secrets.GITHUB_TOKEN }}
                  working-directory: my-directory
                  args: --all-features

Related:

#93 I change cwd instead of manifest-path
#28

@mattiekat
Copy link

mattiekat commented Oct 25, 2021

Is there anything blocking this PR? My team could use this now. We have a mono-repo setup and it at least seems like there is no way to "just cd into the right directory" before running the action.

@MariusVB
Copy link

I'm also interested in this but have found a temporary solution. Just replace {CARGO_SUBDIR} with your cargo project directory in your repo and {DIRS_TO_REMOVE} with all the non-cargo directories in the top-level of your repo:

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Moves all files in sub dir to top-level dir
      - run: cd $GITHUB_WORKSPACE && mv {CARGO_SUBDIR}/* .
      # Delete directories not to be audited
      - run: cd $GITHUB_WORKSPACE && rm -rf {DIRS_TO_REMOVE}
      - uses: actions-rs/audit-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

@mattiekat
Copy link

I wish this would work for us but our rust code actually imports some headers with the cxx create so we're at the extreme end. If I were really dedicated to making it work I could symlink things, but it's windows so that is annoying, and or restructure.

@reinismu
Copy link
Author

While this is not merged in I use my repo to run actions

            - uses: reinismu/clippy-check@master # switch to original when merged https://github.com/actions-rs/clippy-check/pull/158
              with:
                  token: ${{ secrets.GITHUB_TOKEN }}
                  working-directory: your-directory

@TimDiekmann
Copy link

While this is not merged in I use my repo to run actions

Works like a charm, thank you!

@r-medina
Copy link

very interested in this getting merged in. monorepos don't play nice with the action as it stands

@adam-azarchs
Copy link

Seeing as how this repo appears to be unmaintained, and seeing as how @kristof-mattei seems to have forked it into https://github.com/actions-rs-plus/clippy-check for #165, maybe it's time to start pushing PRs that way? I don't know enough about any of the people involved to endorse one fork over another but it would be nice if some kind of consensus was reached. This is always the problem when maintainers step back...

adam-azarchs added a commit to 10XGenomics/clippy-check that referenced this pull request Nov 24, 2022
This resolves conflicts between
actions-rs#158
and other changes which have happened since.
@adam-azarchs
Copy link

I've merged this PR into the https://github.com/10XGenomics/clippy-check fork, which is itself a fork off of https://github.com/actions-rs-plus/clippy-check (we're pretty heavy users of clippy-check internally, and we have a few monorepos where this working directory change is vital). We'll probably make a tag there pretty soon.

@yisonPylkita
Copy link

Since actions-rs is an organisation it would speed things up if @svartalf could add more people with review&approve permissions
@svartalf If you're reading this please consider adding more people

@adam-azarchs
Copy link

As they've said elsewhere, they are not comfortable with adding strangers as additional maintainers for a project with this much usage. And they're right, unfortunately. There have been too many incidents with new maintainers surreptitiously injecting malicious code into projects; software supply chain attacks have been on the rise. It's understandable that they wouldn't want to take responsibility for adequately vetting new maintainers.

@SKTT1Ryze
Copy link

Is this pr still going on? Hope it be merged soon!

@kristof-mattei
Copy link

Is this pr still going on? Hope it be merged soon!

Merged here: actions-rs-plus#387

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

9 participants