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

There is an error, when I push without a tag #66

Closed
L-Super opened this issue May 28, 2024 · 6 comments
Closed

There is an error, when I push without a tag #66

L-Super opened this issue May 28, 2024 · 6 comments
Assignees

Comments

@L-Super
Copy link

L-Super commented May 28, 2024

I have set default value, but I still get an error message

Warning: Unexpected input(s) 'default', valid inputs are ['strip_v']
Run devops-actions/[email protected]
  with:
    default: v0.0.0
    strip_v: false
  env:
    build_type: Release
Error: Not a tag ref (refs/heads/main)
@rajbos rajbos changed the title Three is an error, when I push without a tag There is an error, when I push without a tag May 30, 2024
@rajbos
Copy link

rajbos commented May 30, 2024

@L-Super : the default input was not available yet in version v1.0.1, you'll need to use devops-actions/[email protected] to be able to do so. I see I had the old version number in the README, which is now updated with #67.

@L-Super
Copy link
Author

L-Super commented May 31, 2024

Most of the time, commits do not have tags, and this will cause an error, but I hope the process can continue. Is there a way to achieve this without setting a default version?

@rajbos
Copy link

rajbos commented Jun 8, 2024

I'd add an 'if' to the step and skip if this is not a tag commit?

@L-Super
Copy link
Author

L-Super commented Jun 9, 2024

I'd add an 'if' to the step and skip if this is not a tag commit?

Here's a solution. I'm currently manually adding if to determine if there is a tag

@rajbos
Copy link

rajbos commented Jun 12, 2024

@L-Super , can you share the if statement here for future reference?

@L-Super
Copy link
Author

L-Super commented Jun 13, 2024

@L-Super , can you share the if statement here for future reference?

- name: Get tag
        uses: devops-actions/[email protected]
        if: startsWith(github.event.ref, 'refs/tags/')
        id: tag

@rajbos rajbos closed this as completed Jun 18, 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