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

Split compute-version and update-version-file into separate jobs #35

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

ll-nick
Copy link
Collaborator

@ll-nick ll-nick commented Nov 12, 2024

This fixes an issue with the release pipeline.

The version bump action does not seem to work with a repository cloned via ssh. This PR therefore splits this into two jobs: One job to just compute the new version using an https clone and a second job that updated the version file and creates a tag. This one then uses the deploy key to bypass the branch protections for the automated changes.

This fixes the issue (tested on a protected devel branch) and also adds a separation of concerns for the different parts of the pipeline.

Fix action name since github-tag-action runs in DRYRUN and does not
actually create a tag.
Remove unecessasry if statement.
Rename docker image to something more generic to be able to reuse this
workflow elsewhere.
@ll-nick ll-nick requested a review from orzechow November 12, 2024 08:12
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 12, 2024

For reference, here is the job that successfully created a new release using this pipeline. Compared to this PR, there were some additional debug prints (2070e4b) and I did at a slight tidy up to this PR (7d33c7a) but those really shouldn't make a difference.

Before merging, I will remove the tag and release created by the test workflow. I will also use the #major label as discussed yesterday.

Copy link
Member

@orzechow orzechow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, sounds like a bug in the github-tag-action.

Thanks for digging into this!

Comment on lines -78 to +90
docker run --rm -v /tmp/artifacts:/tmp/artifacts util_caching_release cp -r /release /tmp/artifacts/
docker run --rm -v /tmp/artifacts:/tmp/artifacts release_builder cp -r /release /tmp/artifacts/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related, but I guess you can simply use docker cp

https://docs.docker.com/reference/cli/docker/container/cp/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know about this one but that only works for running containers. So we'd have to start the container, then run docker cp. My solution is a single command that's why I opted for that one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't know about that – again sth. learned 😁

@ll-nick ll-nick merged commit 892831a into main Nov 12, 2024
1 check passed
@ll-nick ll-nick deleted the fix_version_bump_workflow branch November 12, 2024 09:44
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.

2 participants