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

[cu-release] Release artifacts can be uploaded to the wrong release / tag #4814

Closed
yurishkuro opened this issue Oct 7, 2023 · 0 comments · Fixed by #4818
Closed

[cu-release] Release artifacts can be uploaded to the wrong release / tag #4814

yurishkuro opened this issue Oct 7, 2023 · 0 comments · Fixed by #4818

Comments

@yurishkuro
Copy link
Member

When ci-release workflow is triggered manually, the BRANCH is is being set to main and the upload release action creates a release & tag called main:

Run svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df
  with:
    file: {deploy/*.tar.gz,deploy/*.zip,deploy/*.sha[2](https://github.com/jaegertracing/jaeger/actions/runs/6438219891/job/17484442468#step:14:2)56sum.txt,deploy/*.asc}
    file_glob: true
    overwrite: true
    tag: refs/heads/main
    repo_token: ***
  env:
    BRANCH: main

We probably need to fix action/setup-branch to run make echo-version if the branch is determined to be main, since the GH variables do not reflect the release tag in that case.

@yurishkuro yurishkuro changed the title [bug] Upload release action can use invalid release name [cu-release] Release artifacts can be uploaded to the wrong release / tag Oct 7, 2023
yurishkuro added a commit that referenced this issue Oct 7, 2023
## Which problem is this PR solving?
- Resolves #4814
- Resolves #4817

## Description of the changes
- Set BRANCH=s/main/main_from_fork/ when running on pull requests. This
should solve the problem with CI failing when people submit a PR from a
main branch in their fork, because our CI scripts think it means docker
images should be uploaded and fail on the lack of credentials. Now they
will skip the uploads.
- Move cleanup of android toolchain to the top of the workflow
- Replace the use of `.github/actions/setup-branch` with custom logic to
set BRANCH which is always based on the recent semver tag.
`setup-branch` will still work for non-release workflows.
- Remove unnecessary success checks in the steps (job fails when any
step fails)
- Use `env.BRANCH` as release name in `upload-release-action` action,
instead of `github.ref`
- Manually upload SBOM to the correct release (to solve #4817)

## How was this change tested?
- Will have to run ci-release manually after merge

---------

Signed-off-by: Yuri Shkuro <[email protected]>
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 a pull request may close this issue.

1 participant