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

Allow overriding action path #627

Closed
wants to merge 3 commits into from

Conversation

etam-pro
Copy link

@etam-pro etam-pro commented Feb 13, 2025

Description

The base branch is using github.action_path as location, which is not necessarily always pointing to the right location (See issue)

This PR attempts to address the issue by allowing an override to the location by taking in an extra optional input.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tested with CI

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@char0n
Copy link
Member

char0n commented Feb 14, 2025

Hi @etam-pro , wouldn’t the use of env variable solve the issue instead? actions/runner#716 (comment)

@etam-pro
Copy link
Author

etam-pro commented Feb 14, 2025

@char0n unfortunately it seems that github.action_path is coded into the action command itself (see here) so it wasn't possible to use a different env for the target location.

@char0n
Copy link
Member

char0n commented Feb 14, 2025

@etam-pro yes, but my suggestion is to change it to follwoing, which according to actions/runner#716 (comment) has always a correct value comparing to ${{ github.action_path }}.

  steps:
    - run: cd ${GITHUB_ACTION_PATH} && npm install
      shell: bash
    - run: cd ${GITHUB_ACTION_PATH} && SWAGGER_EDITOR_URL=${{ inputs.swagger-editor-url }} DEFINITION_FILE=${{ inputs.definition-file }} IGNORE_ERROR=${{ inputs.ignore-error }} DEFAULT_TIMEOUT=${{ inputs.default-timeout }} node src/index.js
      shell: bash

@etam-pro
Copy link
Author

I see what you mean, certainly let me try that out 👍

@char0n
Copy link
Member

char0n commented Feb 14, 2025

Superseeded by #629

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

Successfully merging this pull request may close these issues.

2 participants