fix(ci): fix release workflow #13
Reference in New Issue
Block a user
Delete Branch "fix/ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Okay, here's a breakdown of the changes introduced by the provided Git diff:
Overall Goal:
The primary goal of this change is to automate the release process using a scheduled trigger (cron) and pre-existing tags, decoupling it from direct
pushevents and leveraging a separate job to generate the release tag. This makes the release process more controlled and predictable.Key Changes:
Trigger Mechanism Changed:
pushevents onmasterormainbranches to a scheduledcronjob.on:section now contains onlyworkflow_dispatchandschedule:cronexpression'0 9 * * 0'means the workflow will run every Sunday at 9:00 AM UTC.Tag Creation Job Introduced:
A new job named
taghas been added. This job is responsible for creating the release tag.It reuses a workflow from
https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/release-with-tag.yaml@main. This implies that workflow handles the logic for determining the tag name and creating the tag in the repository.create_releaseJob Modified:The
create_releasejob now depends on thetagjob (needs: tag).It now uses a different reusable workflow:
https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release-preexisting-tag.yaml@main. This new workflow is designed to create a release based on a pre-existing tag.It receives the tag name and changelog from the
tagjob outputs:print_releaseJob Removed:print_releasejob has been removed. This job simply echoed the release name and was likely used for debugging or informational purposes. It's not essential to the release process itself.create_dockerJob Updated:The
create_dockerjob now depends on bothtagandcreate_releasejobs.The
refin theactions/checkoutstep is updated to useneeds.tag.outputs.tag_nameto checkout the tag created in thetagjob.The
tagsvalue in thedocker/metadata-actionstep is also updated to useneeds.tag.outputs.tag_name.Impact and Reasoning:
tagjob isolates the tag creation logic. This could involve automated version bumping based on commit messages or other criteria (details are in the reusable workflow it uses). This separation of concerns makes the overall workflow more maintainable.create_release-preexisting-tag.yamlworkflow suggests that the release creation is now based on the tag created by thetagjob. This is useful because the tag might contain metadata like the version number, which is then used to create the release.create_dockerjob ensures that Docker images are built and published based on the release tag, maintaining consistency between the release and the published artifacts.In summary, the changes represent a move towards a more automated and structured release process driven by a schedule and a separate tag creation step.
Decision: Accept
Change Score: 9/10
Okay, I've reviewed the changes to the release workflow. The changes look good overall, moving to a tag based release system is a great idea.
Here's a breakdown:
tag) to create the release tag, which is more organized.create-release-preexisting-tag.yamlis correct given the new tag creation process.publishjob (nowcreate_docker) correctly waits for both the tag creation and the release creation before building the docker images.refin the checkout action and thevaluein the docker metadata action are correctly updated to use the tag name.A few minor things:
main. This is likely intentional, but make sure this is correct.schedulesection. While commented out code is harmless, consider removing it to reduce confusion.I am happy to accept this, but keep the comments in mind.