-
Notifications
You must be signed in to change notification settings - Fork 7
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
Inputs are ignored #38
Comments
you are correct, they aren't used as you have to map If this is an issue, we would be happy to accept a PR that can deal with both, we would just need to make a decision as to which takes precedence if both are specified (workflow input vs env var), pick one and warn the user. Or potentially have an option to fail fast, if multiple options are specified so the user has an opt-in chance to rectify |
@YOU54F Examples of why this is so unintuitiveWork, but parser gives me the following error - uses: pactflow/actions/can-i-deploy@v1.3.0
env:
to: development
version: ${{ env.VERSION }}
application_name: "NAME"
PACT_BROKER_BASE_URL: ${{ secrets.PACT_BROKER_BASE_URL }}
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} Works, but with parameters are ignored - uses: pactflow/actions/can-i-deploy@v1.3.0
with:
PACT_BROKER_BASE_URL: Anything
PACT_BROKER_TOKEN: Anything
application_name: Anything
version: Anything
to: Anything
env:
to: development
version: ${{ env.VERSION }}
application_name: "NAME"
PACT_BROKER_BASE_URL: ${{ secrets.PACT_BROKER_BASE_URL }}
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} Fails, but the parser is happy - uses: pactflow/actions/can-i-deploy@v1.3.0
with:
to: development
version: ${{ env.VERSION }}
application_name: "NAME"
PACT_BROKER_BASE_URL: ${{ secrets.PACT_BROKER_BASE_URL }}
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} RecommendationInstead of this runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/canideployTo.sh
shell: bash Do this: runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/canideployTo.sh
shell: bash
env:
PACT_BROKER_TOKEN: ${{ inputs.PACT_BROKER_TOKEN || env.PACT_BROKER_TOKEN }}
PACT_BROKER_BASE_URL: ${{ inputs.PACT_BROKER_BASE_URL || env.PACT_BROKER_BASE_URL }}
application_name: ${{ inputs.application_name || env.application_name }}
version: ${{ inputs.version || env.version }}
latest: ${{ inputs.latest || env.latest }}
to: ${{ inputs.to || env.to }}
retry_while_unknown: ${{ inputs.retry_while_unknown || env.retry_while_unknown }}
retry_interval: ${{ inputs.retry_interval || env.retry_interval }} Or this: runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/canideployTo.sh
shell: bash
env:
PACT_BROKER_TOKEN: ${{ inputs.PACT_BROKER_TOKEN }}
PACT_BROKER_BASE_URL: ${{ inputs.PACT_BROKER_BASE_URL }}
application_name: ${{ inputs.application_name }}
version: ${{ inputs.version }}
latest: ${{ inputs.latest }}
to: ${{ inputs.to }}
retry_while_unknown: ${{ inputs.retry_while_unknown }}
retry_interval: ${{ inputs.retry_interval }} |
-⚠️ Migrates to workflow-inputs over environment variables. Fixes #38 - Users should see the actions.yml in each action, for correct usage - Will require users to switch from `env:` to `with:`, however existing environment variables will be picked up. -⚠️ inputs for `publish-provider-contract` have changed, see actions file `./publish-pact-files/action.yml`, existing values will be picked up - adds command - record-release - supports auto-detection of version in - record-release - record-deployment - publish-provider-contract (including branch) - publish-pact-files (including branch) - create-version-tag - create-or-update-version (including branch) - can-i-deploy - Support for Pact Broker Basic Auth via `PACT_BROKER_USERNAME` / `PACT_BROKER_PASSWORD` Will be bumped to V2, so it is opt-in unless users are running against main
All the actions specify inputs, e.g. record-deployment/action.yml:
However, in the bash scripts, the inputs are ignored and the values of environment variables are used.
The text was updated successfully, but these errors were encountered: