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

Add matrix input to Github Action #591

Conversation

mathias-luedtke
Copy link
Member

@mathias-luedtke mathias-luedtke commented Jan 23, 2021

jobs:
  industrial_ci:
    strategy:
      matrix:
        ROS_DISTRO: [melodic]
        ROS_REPO: [testing, main]
    runs-on: ubuntu-latest
    steps:
      - ...
      - uses: 'ros-industrial/industrial_ci@master'
        with:
          matrix: ${{toJSON(matrix)}}

$ can be escaped with $$.
Without escaping, the variable substitution will happen immediately.

@mathias-luedtke
Copy link
Member Author

Not sure, if matrix is the right name. config might be better.

@gavanderhoorn
Copy link
Member

$ can be escaped with $$.
Without escaping, the variable substitution will happen immediately.

can or must?

The latter would be unfortunate.

@mathias-luedtke
Copy link
Member Author

$ can be escaped with $$.
Without escaping, the variable substitution will happen immediately.

can or must?

Depends ;)
It works the same as for Gitlab CI.
For BEFORE/AFTER_* scripts you must escape it, for configuration variable early substitution should be fine.

I could rewrite it to not support substitution at all, but then there might be no way to have substitution for Github Actions.

@mathias-luedtke mathias-luedtke marked this pull request as ready for review February 7, 2021 17:25
@mathias-luedtke
Copy link
Member Author

I just renamed the input to config and decided to not change the template yet (to be discussed in #590).

@mathias-luedtke mathias-luedtke merged commit 2867438 into ros-industrial:master Feb 7, 2021
@mathias-luedtke mathias-luedtke deleted the feature/action-matrix-input branch February 7, 2021 18:00
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

Successfully merging this pull request may close these issues.

2 participants