Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Feature] Add option alias for using with Github action matrices #1812

Closed
2 tasks done
onedr0p opened this issue Dec 23, 2023 · 3 comments · Fixed by #1814
Closed
2 tasks done

[Feature] Add option alias for using with Github action matrices #1812

onedr0p opened this issue Dec 23, 2023 · 3 comments · Fixed by #1814
Labels
enhancement New feature or request

Comments

@onedr0p
Copy link

onedr0p commented Dec 23, 2023

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

Hi 👋🏼

There's a lot of options you need to set to get this action to work properly with GH matrices, it would be nice if there was an alias to the options needed.

Describe the solution you'd like?

Create an alias for the following options

      - name: Get changed files
        id: changed-files
        uses: tj-actions/changed-files@v41
        with:
          files: apps/**
          escape_json: false
          json: true
          quotepath: false
          safe_output: false

It would be nice to have an option that defaulted the above options instead of providing them all

      - name: Get changed files
        id: changed-files
        uses: tj-actions/changed-files@v41
        with:
          files: apps/**
          matrix: true

Describe alternatives you've considered?

No response

Anything else?

Again, thanks for this awesome action. Happy holiday! ☃️

Code of Conduct

  • I agree to follow this project's Code of Conduct
@onedr0p onedr0p added the enhancement New feature or request label Dec 23, 2023
@jackton1
Copy link
Member

jackton1 commented Dec 24, 2023

Hi @onedr0p, just for clarity there are only two inputs that are required to use outputs in matrix jobs which are json and escape_json.

The other inputs you specified aren’t necessarily required in all cases.

Two inputs vs One would be the ask in this case.

@onedr0p
Copy link
Author

onedr0p commented Dec 24, 2023

@jackton1 on updating to v41 I definitely had to set safe_output: false and I am pretty sure the other options are also needed.

Check out this PR where I only have the options set that you recommend and here's the failing workflow. When I add those options back it succeeds.

[Flux Diff: .github#L1](https://github.com/onedr0p/home-ops/pull/6644/files#annotation_16601729532)
Error when evaluating 'strategy' for job 'flux-diff'. .github/workflows/flux-diff.yaml (Line: 55, Col: 16): Error parsing fromJson,.github/workflows/flux-diff.yaml (Line: 55, Col: 16): Unexpected character encountered while parsing value: \. Path '', line 1, position 1.,.github/workflows/flux-diff.yaml (Line: 55, Col: 16): Unexpected value ''

Maybe there's another underlaying issue?

@jackton1
Copy link
Member

Hmm, interesting I believe that’s a bug. I’ve identified the source and pushed a fix which should released soon

@jackton1 jackton1 linked a pull request Dec 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants