Skip to content

Feature: use Github working directory #160

@joergi

Description

@joergi

In GitHub Actions you can use working directory:

documentation

This is an example, how it should look like

jobs:
  a-job-name:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./apache-beam-dependency-problem

but later in the file existence check, I have to repeat the working directory for the file existence check

   - name: "Check file existence linux"
        id: check_files
        uses: andstor/file-existence-action@v3.0.0
        with:
          files: "./apache-beam-dependency-problem/build/install/apache-beam-dependency-problem/lib/beam-runners-direct-java-2.53.0.jar"
          fail: true

These examples are from here

there should be a possibility to say: use working_dir yes or no.

I would love to see the example working like this:

   - name: "Check file existence linux"
        id: check_files
        uses: andstor/file-existence-action@v3.0.0
        with:
          files: "./apache-beam-dependency-problem/build/install/apache-beam-dependency-problem/lib/beam-runners-direct-java-2.53.0.jar"
          fail: true
          working_dir: true

Readme.md should look like this:

Input variable Necessity Description Default
files Required Comma separated string with paths to files and directories to check for existence. Supports glob paterns.
ignore_case Optional Ignore if a file name has upper or lower cases. true
follow_symbolic_links Optional Indicates whether to follow symbolic links. true
fail Optional Makes the Action fail on missing files. false
working_dir Optional Uses the github working directory. false

It would make sense to have the working_dir set as a standard to true but this would let all existing file checks fail, that's why I would set it default to false.

I was trying to look if I could implement it myself, but I was missing the skills to do it in TypeScript

this could also maybe closes issue #150

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions