fix(ci): fix release workflow #13
Loading…
x
Reference in New Issue
Block a user
No description provided.
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
push
events and leveraging a separate job to generate the release tag. This makes the release process more controlled and predictable.Key Changes:
Trigger Mechanism Changed:
push
events onmaster
ormain
branches to a scheduledcron
job.on:
section now contains onlyworkflow_dispatch
andschedule
:cron
expression'0 9 * * 0'
means the workflow will run every Sunday at 9:00 AM UTC.Tag Creation Job Introduced:
A new job named
tag
has 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_release
Job Modified:The
create_release
job now depends on thetag
job (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
tag
job outputs:print_release
Job Removed:print_release
job 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_docker
Job Updated:The
create_docker
job now depends on bothtag
andcreate_release
jobs.The
ref
in theactions/checkout
step is updated to useneeds.tag.outputs.tag_name
to checkout the tag created in thetag
job.The
tags
value in thedocker/metadata-action
step is also updated to useneeds.tag.outputs.tag_name
.Impact and Reasoning:
tag
job 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.yaml
workflow suggests that the release creation is now based on the tag created by thetag
job. This is useful because the tag might contain metadata like the version number, which is then used to create the release.create_docker
job 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.yaml
is correct given the new tag creation process.publish
job (nowcreate_docker
) correctly waits for both the tag creation and the release creation before building the docker images.ref
in the checkout action and thevalue
in 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.schedule
section. While commented out code is harmless, consider removing it to reduce confusion.I am happy to accept this, but keep the comments in mind.