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

ci(release): fix publishing krew plugin; add '.exe' extension to Windows binary #1140

Merged
merged 2 commits into from Mar 13, 2023
Merged

Conversation

HollowMan6
Copy link
Contributor

Overview

Fix publishing krew plugin in release CI

There's an error that stops it from getting the right tag, which is, a needs: retag is needed so that it can get the value from ${{ needs.retag.outputs.NEW_TAG }}:
Screenshot from 2023-03-11 16-39-44

However, fixing that won't work still: https://github.com/HollowMan6/kubescape/actions/runs/4392160217/jobs/7691893332
As you can't override the GITHUB_REF variable due to GitHub Actions' limit, quoting from the GitHub Actions' documentation: "If you attempt to override the value of one of these default variables, the assignment is ignored."

So I moved the Publish Krew plugin into a separate CI, which is triggered by exactly matching the tag created by the release CI. Also as events triggered by the GITHUB_TOKEN will not create a new workflow run, I changed the release token into the secrets.GH_PERSONAL_ACCESS_TOKEN.

Test in my fork:
https://github.com/HollowMan6/kubescape/actions/runs/4392626675 results in PR: kubernetes-sigs/krew-index#3000

Then I fixed the if: check so that it won't get triggered in a fork.

add '.exe' extension to Windows binary

Add '.exe' extension to Windows binaries, as Windows executables usually have .exe extension.

Signed-off-by: Hollow Man <hollowman@opensuse.org>
Signed-off-by: Hollow Man <hollowman@opensuse.org>
@HollowMan6
Copy link
Contributor Author

Just revert adding the '.exe' to the release binary, as that naming convention was introduced long time ago and it looks like it would break a lot of things if we introduce this change: https://github.com/search?q=kubescape-windows-latest&type=code

However, I would still recommend adding the '.exe' to the binary inside the tarball, as so far that is only used for Krew and there's still chance for it to get corrected. https://github.com/search?q=kubescape-windows-latest.tar.gz&type=code

@matthyx
Copy link
Contributor

matthyx commented Mar 12, 2023

@dwertent fine for me

@dwertent dwertent merged commit fd92411 into kubescape:master Mar 13, 2023
8 checks passed
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

3 participants