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

Can't set retry vars in Github Actions #20

Closed
grrywlsn opened this issue May 22, 2023 · 6 comments
Closed

Can't set retry vars in Github Actions #20

grrywlsn opened this issue May 22, 2023 · 6 comments

Comments

@grrywlsn
Copy link

Our Pact checks are taking some time to complete, so we're following the advice in the docs to retry over time. However it doesn't seem like we can set that in the Github Action (only if we swap to CLI).

This is what we expected would work:

    - name: can-i-deploy
      uses: pactflow/actions/can-i-deploy@v1.0.1
      env:
        version: 1.2.3
        to_environment: "dev"
        application_name: app
        retry_while_unknown: 5
        retry_interval: 5

Is this something that should be added here or is there a better way to handle this?

@YOU54F
Copy link
Member

YOU54F commented May 22, 2023

Hiya @grrywlsn

Yes you are correct, not all of the options are mapped, and actually in doing so, we've created more of a maintenance burden of ourselves as maintainers of these actions, and inconvenience for users are you cannot easily get at the options without them being exposed.

I actually trialled out something different which basically downloads the cli tools for whichever platform you are using and exposes them on the path, so you can all the pact-ruby-standalone commands at your fingertips, will any new options available as soon as they are released

https://github.com/YOU54F/pact-cli-action

Unfortunately as the actions and the way they are laid out now in this repo, I can't determine usage stats from the marketplace :(

This composite action is the real file of interest

https://github.com/YOU54F/pact-cli-action/blob/main/action.yml

@grrywlsn
Copy link
Author

Thanks for the reply @YOU54F. Sounds like something that would justify a v2 of the action?

As a workaround, we've decided to swap away from the Github Action and instead just have the pact-cli Docker image as one of our Action steps.

@YOU54F
Copy link
Member

YOU54F commented May 23, 2023

ahh fabulous, are you able to run that on macos and windows runners as they don’t have support for docker?

yeah in lieu of having a separate action, i’d be happy to accept a pr to expose the options requested in your OP

@grrywlsn
Copy link
Author

We're running builds on a linux runner so don't have that constraint right now.

If you're happy to accept PRs, I'll put some time together in the coming weeks to raise a potential fix here. Thanks!

@YOU54F
Copy link
Member

YOU54F commented Jun 9, 2023

I've just added a general purpose action now which gives users access to the cli in gh workflows so you can use any of the tools in the pact-ruby-standalone bundle, and any of the available options contained within

@YOU54F
Copy link
Member

YOU54F commented Sep 5, 2024

Forgot to add this was completed recently

#46

@YOU54F YOU54F closed this as completed Sep 5, 2024
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

2 participants