-
Notifications
You must be signed in to change notification settings - Fork 43
fix: update image output handling in release.yml #391
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
.github/workflows/release.yml
Outdated
- name: cache images | ||
working-directory: core/deploy | ||
run: | | ||
sudo sealos login -u "${{ github.repository_owner }}" -p "${{ secrets.GITHUB_TOKEN }}" ghcr.io | ||
sed -i "s#${{ env.GHCR_REPO }}:latest#${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}#g" manifests/deploy.yaml.tmpl | ||
sudo sealos registry save --registry-dir=registry_amd64 --arch amd64 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obtain version before rewriting manifest
In the release-sealos-images
job the “cache images” step rewrites manifests/deploy.yaml.tmpl
using ${{ steps.meta.outputs.version }}
, but the meta
step is defined later in the job. At runtime this output is empty, so the sed
replacement produces image references like ghcr.io/<repo>:
and sealos registry save
will fail with an invalid reference format. Run the metadata action before this step or reuse the version generated in the previous job before editing the manifest.
Useful? React with 👍 / 👎.
8f6b625
to
43ce187
Compare
cf7e774
to
9df5f2c
Compare
9df5f2c
to
4bc38be
Compare
To use Codex here, create an environment for this repo. |
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
.github/workflows/release.yml
Outdated
GHCR_REPO: ghcr.io/${{ github.repository }} | ||
ALIYUN_REGISTRY: ${{ secrets.ALIYUN_REGISTRY }} | ||
ALIYUN_REPO: ${{ secrets.ALIYUN_REPO != '' && secrets.ALIYUN_REPO || secrets.ALIYUN_USERNAME != '' && format('{0}/{1}/{2}', secrets.ALIYUN_REGISTRY, secrets.ALIYUN_USERNAME, 'aiproxy') || '' }} | ||
ALIYUN_REPO: ${{ secrets.ALIYUN_REPO != '' && secrets.ALIYUN_REPO || (secrets.ALIYUN_REGISTRY != '' && secrets.ALIYUN_USERNAME != '' && format('{0}/{1}/{2}', secrets.ALIYUN_REGISTRY, secrets.ALIYUN_USERNAME, 'aiproxy')) || '' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it as ${{ secrets.ALIYUN_REPO != '' && secrets.ALIYUN_REPO || (secrets.ALIYUN_REGISTRY != '' && secrets.ALIYUN_USERNAME != '') && format('{0}/{1}/{2}', secrets.ALIYUN_REGISTRY, secrets.ALIYUN_USERNAME, 'aiproxy') || '' }}
better conforms to the && ||
syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request introduces improvements to the release workflow and deployment process, focusing on better handling of image targets, enhanced support for multi-architecture images, and the addition of a dedicated job for building and pushing Sealos images. It also adds a new installation script and refines deployment scripts for more robust configuration handling.
Release workflow enhancements:
.github/workflows/release.yml
). [1] [2]ALIYUN_REPO
environment variable to ensure correct formatting when registry and username secrets are present (.github/workflows/release.yml
).Sealos image support and multi-architecture builds:
release-sealos-images
job to the workflow, which builds and pushes cluster images for multiple platforms (amd64 and arm64), and includes improved login steps for various registries (.github/workflows/release.yml
).Kubefile
to support multi-architecture builds by using platform-specific registry directories and theTARGETARCH
build argument (core/deploy/Kubefile
).Deployment and installation improvements:
.github/scripts/install.sh
).cloudDomain
configuration, ensuring ingress resources are created only when the domain is specified (core/deploy/scripts/init.sh
).