-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
This document outlines how to set up and execute releases on GitHub for the loft-sh/cluster-api-provider-vcluster repository using the provided GitHub Actions workflow file. The workflow is designed to automate the release process, including setting up the environment, preparing release files, publishing images, and creating or editing a release. | ||
|
||
# Workflow Overview | ||
|
||
The workflow is triggered whenever a release is created on GitHub and is based on three main jobs: | ||
|
||
publish-capi-yamls: Prepares and publishes the release files. | ||
publish-images: Builds and pushes Docker images. | ||
publish-release: Creates or updates the GitHub release. | ||
|
||
# Details of Workflow Steps | ||
|
||
## 1. publish-capi-yamls | ||
|
||
- Trigger: When a tag starting with v is pushed. | ||
- Environment: Runs on Ubuntu 18.04. | ||
- Main Steps: | ||
- Setup Go 1.22. | ||
- Checkout the code. | ||
- Extract the release version from the tag. | ||
- Prepare the release files using make release. | ||
- Upload the prepared release assets. | ||
- Attach assets to the GitHub release. | ||
|
||
## 2. publish-images | ||
|
||
- Trigger: Same as publish-capi-yamls. | ||
- Environment: Runs on Ubuntu 18.04. | ||
|
||
- Main Steps: | ||
- Setup Docker and QEMU for cross-platform build support. | ||
- Login to DockerHub. | ||
- Build and push Docker images. | ||
- Output the images' digests. | ||
|
||
## 3. publish-release | ||
|
||
- Trigger: Needs successful completion of publish-images. | ||
- Environment: Runs on Ubuntu 18.04. | ||
- Main Steps: | ||
- Checkout the repository. | ||
- Extract the release version. | ||
- Set up Hub CLI for GitHub. | ||
- Fetch tags from the origin. | ||
- Create or update the GitHub release with the extracted version. | ||
|
||
# Usage Instructions | ||
|
||
- Prepare the Release: | ||
- Ensure that your code changes are merged into the main branch. | ||
- Tag the release with a version number, prefixed with v. For example, v1.0.0. | ||
|
||
- Push the Tag to GitHub: | ||
- Push the tag to GitHub using git push origin <tag_name>. | ||
- This will trigger the GitHub Actions workflow. | ||
|
||
- Monitor the Workflow: | ||
- Check the Actions tab in the GitHub repository to monitor the progress. | ||
- If any step fails, the subsequent steps will not execute. | ||
|
||
- Check the Release: | ||
- Once the workflow completes, verify the release in the "Releases" section of the GitHub repository. | ||
- Ensure the assets and Docker images are correctly published. | ||
|
||
- Troubleshooting: | ||
- If any issues arise, check the logs of the GitHub Actions workflow for detailed error messages. | ||
- Correct any issues and rerun the workflow if necessary. | ||
|
||
- Manual Intervention (if needed): | ||
- If automatic processes fail, you may need to manually attach assets or create/edit the release on GitHub. |