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

Strip refs/heads/ from the input tag. #23

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

OmarEmaraDev
Copy link
Contributor

This patch strips refs/heads/ from the input tag to make it easier to
use the action with pushes on branches.

This patch strips refs/heads/ from the input tag to make it easier to
use the action with pushes on branches.
@OmarEmaraDev
Copy link
Contributor Author

Those checks are failing in master, so I suppose they are not related to the patch?

@svenstaro
Copy link
Owner

Thanks! Could you give me a short example of what an input would look like to this?

@OmarEmaraDev
Copy link
Contributor Author

The input can be ${{ github.ref }} as in the examples provided. The code assumes the workflow will trigger on tag pushes and strips refs/tags/ accordingly. However, for workflows that triggers on pushes to branches, ${{ github.ref }} will be refs/heads/<branch-name>, so this patch strips this as well.

@svenstaro
Copy link
Owner

Ok, that's actually pretty cool. Do you think an example for the README would be appropriate?

@OmarEmaraDev
Copy link
Contributor Author

I don't think a dedicated example would be necessary. But we should probably mention that change in the description of the tag input though. I will add that.

@svenstaro
Copy link
Owner

The failure appears because of course you don't have write permissions from your forks into my fork so it can't run the E2E tests which also create a real release on this repo. I'll take a look at this soon.

@svenstaro svenstaro merged commit 0d3c327 into svenstaro:master Aug 10, 2020
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.

None yet

2 participants