-
Notifications
You must be signed in to change notification settings - Fork 24
chore: test ci optimizations #360
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
base: main
Are you sure you want to change the base?
Conversation
bf98d38 to
ceecfa2
Compare
.github/workflows/ci-base.yaml
Outdated
| # Base hash for source generation (inputs that affect generation) | ||
| SOURCE_HASH="${{ hashFiles('distributions/${{ inputs.distribution }}/manifest.yaml', 'distributions/${{ inputs.distribution }}/_build/go.mod', 'distributions/${{ inputs.distribution }}/_build/go.sum', 'Makefile') }}" | ||
| # Extended hash for Docker build (includes generated sources) | ||
| DOCKER_HASH="${{ hashFiles('distributions/${{ inputs.distribution }}/Dockerfile', 'distributions/${{ inputs.distribution }}/manifest.yaml', 'distributions/${{ inputs.distribution }}/_build/go.mod', 'distributions/${{ inputs.distribution }}/_build/go.sum') }}" |
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.
Embedded configs probably need to be part of the docker hash, right?
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.
ooh, yes, good catch
| if [ ${{ inputs.nightly }} = "true" ]; then | ||
| echo "image_tag=$VERSION-nightly-$ARCH" >> $GITHUB_ENV | ||
| else | ||
| echo "image_tag=$VERSION-$ARCH" >> $GITHUB_ENV |
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.
The else block is in conflict with the entire step being condition on nightly?
98a43e6 to
907a478
Compare
| ~/go/pkg/mod | ||
| key: ${{ steps.build-cache-keys.outputs.binary_key }} | ||
| restore-keys: | | ||
| goreleaser-build-${{ inputs.distribution }}- |
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.
The binary_key doesn't have the goreleaser-build- prefix, so will this ever hit anything?
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.
good catch
| # Fallback version | ||
| VERSION="cached-$(date +%Y%m%d-%H%M)" | ||
| echo "⚠️ Warning: No metadata found, using fallback version: $VERSION" |
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.
Have we encountered this? Is this to have a fallback when goreleaser changes where it writes its metadata or is there a different scenario I am not thinking of? I am wondering if we should just fail the build instead of semi-silently continue?
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.
Didn't encounter it but didn't want a scenario where build cache could get corrupted. I'm fine taking this out and we see if it's something we run into
No description provided.