-
Notifications
You must be signed in to change notification settings - Fork 0
🐛 fix(ci): resolve GoReleaser docker build failure and migrate deprecated configs #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1a65525
🐛 fix(ci): resolve GoReleaser docker build context error
l2D 6abd59d
✨ feat(docker): add dedicated Dockerfile for GoReleaser builds
l2D 8538b8d
♻️ refactor(goreleaser): migrate to non-deprecated configuration
l2D 973df8c
🔧 chore: adds goreleaser to mise config
l2D 32a1126
👷 ci(release): add dry-run mode for PRs and manual triggers
l2D File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,26 @@ | ||
| # Dockerfile for GoReleaser - uses pre-built binary | ||
| FROM mcr.microsoft.com/azure-cli:2.82.0 | ||
|
|
||
| LABEL org.opencontainers.image.title="azswitch" | ||
| LABEL org.opencontainers.image.description="TUI for switching Azure tenants and subscriptions" | ||
| LABEL org.opencontainers.image.source="https://github.com/l2D/azswitch" | ||
| LABEL org.opencontainers.image.licenses="MIT" | ||
|
|
||
| # Create non-root user | ||
| RUN tdnf install -y shadow-utils && \ | ||
| groupadd -g 1000 azswitch && \ | ||
| useradd -u 1000 -g azswitch -d /home/azswitch -s /bin/sh -m azswitch && \ | ||
| tdnf clean all | ||
|
|
||
| # Copy pre-built binary from GoReleaser (dockers_v2 places binaries in $TARGETPLATFORM/) | ||
| ARG TARGETPLATFORM | ||
| COPY ${TARGETPLATFORM}/azswitch /usr/local/bin/azswitch | ||
|
|
||
| # Set up Azure CLI cache directory with proper ownership | ||
| RUN mkdir -p /home/azswitch/.azure && \ | ||
| chown -R azswitch:azswitch /home/azswitch/.azure | ||
|
|
||
| USER azswitch | ||
| WORKDIR /home/azswitch | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/azswitch"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Workflow gap when
dry_runisfalseon manual dispatch.When
workflow_dispatchis triggered withdry_run: false, neither step will execute:github.event_name == 'push'with a tag ref (line 59)inputs.dry_runto be true forworkflow_dispatch(line 69)If the intent is to allow manual releases without tags, consider adjusting the conditions. If manual dispatch should only support dry-run mode, consider removing the
dry_runinput entirely or documenting this limitation.Option: Make dry_run always true for workflow_dispatch
If manual dispatch should always be dry-run only:
workflow_dispatch: inputs: dry_run: description: 'Run in dry-run mode (no publish)' required: false default: true type: booleanConsider removing the input if manual releases aren't intended, or document that actual releases require pushing a tag.
🤖 Prompt for AI Agents