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

Unable to input some options #33

Open
asayamakk opened this issue Aug 6, 2024 · 3 comments
Open

Unable to input some options #33

asayamakk opened this issue Aug 6, 2024 · 3 comments

Comments

@asayamakk
Copy link

When passing the following options mentioned in the README to 'with', it results in "Unexpected input(s)" and does not function as expected:
'verbose', 'enable-run-exec-scope'

There may be other options that also cannot be used.

Here is the YAML for GitHub Actions to reproduce this issue:

name: "runn with run:exec"
on:
  pull_request: ~

jobs:
  runn-run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: k2tzumi/runn-action@latest
        with:
          command: run
          path_pattern: '*.yml'
          verbose: true
          enable-run-exec-scope: true

runn yaml (not necessarily required)

desc: echo current date
steps:
  prepareDate:
    desc: prepare date
    exec:
      command: date +%Y-%m-%d | tr -d '\n'
    bind:
      today_full: current.stdout
  dumpDate:
    desc: echo date
    dump: today_full

You can also check this in the GitHub Actions Log of this repository
https://github.com/asayamakk/runn-action/actions/runs/10262294125/job/28391670470#step:4:1

Screen Shot 2024-08-06 at 16 53 49

(Note that login or permissions may be required to view, if unable to access it, I will invite you)

How should I pass the enable-run-exec-scope as described in the README?

@fizzkazz
Copy link

fizzkazz commented Aug 21, 2024

I believe the cause of this problem is as follows.

README.md says:

- uses: k2tzumi/runn-action@latest

When you set up like this, GitHub Actions will look for the latest ref of k2tzumi/runn-action. However, it is possible that the latest ref is pointing to an old latest tag: https://github.com/k2tzumi/runn-action/releases/tag/latest

In that case, the old action will be referenced, so it is an expected behaviour that there would be the parameters that don't defined.

action.yaml at the commit tagged as latest:

inputs:
  command:
    description: run or list
    required: true
    default: 'run'
  path_pattern:
    description: Path pattern
    required: true
  debug:
    description: Filter runbooks to be executed
    required: false
    default: false
  fail-fast:
    description: Fail fast mode
    required: false
    default: false
  skip-test:
    description: Skip test mode
    required: false
    default: false

I assume this also aligns with the warning in @asayamakk 's test flow.

Warning: Unexpected input(s) 'verbose', 'enable-run-exec-scope', valid inputs are ['entryPoint', 'args', 'command', 'path_pattern', 'debug', 'fail-fast', 'skip-test']

To avoid this, you need to specify another ref but the problem is #32 need to be merged in order to use the version tag larger than v0.100.0.

@k2tzumi
Copy link
Owner

k2tzumi commented Aug 22, 2024

https://github.com/k1LoW/runn?tab=readme-ov-file#scope

A scopes option has been added to runn.
We're planning to support this option in actions as well.

@k2tzumi
Copy link
Owner

k2tzumi commented Aug 23, 2024

It was already implemented.
#26

@asayamakk
Please check back as I believe the problem has been resolved.

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

No branches or pull requests

3 participants